/[BackupPC]/trunk/bin/BackupPC_incPartsUpdate
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_incPartsUpdate

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

revision 182 by dpavlin, Wed Oct 12 11:15:18 2005 UTC revision 192 by dpavlin, Thu Oct 13 15:09:55 2005 UTC
# Line 63  select Line 63  select
63          backups.id as backup_id,          backups.id as backup_id,
64          hosts.name as host,          hosts.name as host,
65          shares.name as share,          shares.name as share,
66          backups.num as num          backups.num as num,
67            inc_size
68  from backups  from backups
69          join shares on backups.hostid = shares.hostid          join shares on backups.hostid = shares.hostid
70                  and shares.id = backups.shareid                  and shares.id = backups.shareid
71          join hosts on shares.hostid = hosts.id          join hosts on shares.hostid = hosts.id
72  where inc_size < 0 and not inc_deleted  where not inc_deleted
73  order by backups.date  order by backups.date
74    
75  } );  } );
# Line 82  my $sth_inc_deleted = $dbh->prepare(qq{ Line 83  my $sth_inc_deleted = $dbh->prepare(qq{
83    
84  while (my $row = $sth->fetchrow_hashref) {  while (my $row = $sth->fetchrow_hashref) {
85          my $tar_file = BackupPC::SearchLib::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'});          my $tar_file = BackupPC::SearchLib::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'});
86    
87            my $size = -1;
88            $size = (stat( "$tar_dir/$tar_file" ))[7] if (-e "$tar_dir/$tar_file");
89    
90            next if ($row->{'inc_size'} != -1 && $size != -1 && $row->{'inc_size'} == $size);
91    
92          print curr_time, " ", $row->{'host'}, ":", $row->{'share'}, " #", $row->{'num'}, " -> $tar_file";          print curr_time, " ", $row->{'host'}, ":", $row->{'share'}, " #", $row->{'num'}, " -> $tar_file";
93    
94          my $t = time();          my $t = time();

Legend:
Removed from v.182  
changed lines
  Added in v.192

  ViewVC Help
Powered by ViewVC 1.1.26