/[BackupPC]/trunk/bin/BackupPC_updatedb
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/BackupPC_updatedb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 247 by dpavlin, Fri Dec 9 12:49:55 2005 UTC revision 248 by dpavlin, Fri Dec 9 14:41:13 2005 UTC
# Line 121  sub hest_update { Line 121  sub hest_update {
121    
122          my $skip_check = $opt{j} && print STDERR "Skipping check for existing files -- this should be used only with initital import\n";          my $skip_check = $opt{j} && print STDERR "Skipping check for existing files -- this should be used only with initital import\n";
123    
124          unless ($use_hest) {          unless (defined($use_hest)) {
125                  print STDERR "HyperEstraier support not enabled in configuration\n";                  print STDERR "HyperEstraier support not enabled in configuration\n";
126                    $use_hest = 0;
127                  return;                  return;
128          }          }
129    
# Line 458  INSERT INTO files Line 459  INSERT INTO files
459          VALUES (?,?,?,?,?,?,?)          VALUES (?,?,?,?,?,?,?)
460  });  });
461    
462  foreach my $host_key (keys %{$hosts}) {  my @hosts = keys %{$hosts};
463    my $host_nr = 0;
464    
465    foreach my $host_key (@hosts) {
466    
467          my $hostname = $hosts->{$host_key}->{'host'} || die "can't find host for $host_key";          my $hostname = $hosts->{$host_key}->{'host'} || die "can't find host for $host_key";
468    
# Line 473  foreach my $host_key (keys %{$hosts}) { Line 477  foreach my $host_key (keys %{$hosts}) {
477                  $hostID = $dbh->last_insert_id(undef,undef,'hosts',undef);                  $hostID = $dbh->last_insert_id(undef,undef,'hosts',undef);
478          }          }
479    
480          print "host ".$hosts->{$host_key}->{'host'}.": ";          $host_nr++;
481            print "host ", $hosts->{$host_key}->{'host'}, " [",
482                    $host_nr, "/", ($#hosts + 1), "]: ";
483    
484          # get backups for a host          # get backups for a host
485          my @backups = $bpc->BackupInfoRead($hostname);          my @backups = $bpc->BackupInfoRead($hostname);

Legend:
Removed from v.247  
changed lines
  Added in v.248

  ViewVC Help
Powered by ViewVC 1.1.26