/[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 293 by dpavlin, Thu Jan 26 00:40:37 2006 UTC revision 294 by dpavlin, Thu Jan 26 01:07:36 2006 UTC
# Line 378  select Line 378  select
378          hosts.name as host,          hosts.name as host,
379          shares.name as share,          shares.name as share,
380          backups.num as num,          backups.num as num,
381            backups.date,
382          inc_size,          inc_size,
383          parts          parts,
384            count(backup_parts.backup_id) as backup_parts
385  from backups  from backups
386          join shares on backups.hostid = shares.hostid          join shares on backups.hostid = shares.hostid
387                  and shares.id = backups.shareid                  and shares.id = backups.shareid
388          join hosts on shares.hostid = hosts.id          join hosts on shares.hostid = hosts.id
389            full outer join backup_parts on backups.id = backup_parts.backup_id
390  where not inc_deleted  where not inc_deleted
391    group by backups.id, hosts.name, shares.name, backups.num, backups.date, inc_size, parts, backup_parts.backup_id
392  order by backups.date  order by backups.date
393    
394  } );  } );
# Line 413  while (my $row = $sth->fetchrow_hashref) Line 417  while (my $row = $sth->fetchrow_hashref)
417    
418          print "# size: $size backup.size: ", $row->{inc_size},"\n" if ($opt{d});          print "# size: $size backup.size: ", $row->{inc_size},"\n" if ($opt{d});
419    
420          if ( $row->{'inc_size'} != -1 && $size != -1 && $row->{'inc_size'} >= $size) {          if ( $row->{'inc_size'} != -1 && $size != -1 && $row->{'inc_size'} >= $size && $row->{parts} == $row->{backup_parts}) {
421                  if ($check) {                  if ($check) {
422                          tar_check($row->{'host'}, $row->{'share'}, $row->{'num'}, $tar_file) && next;                          tar_check($row->{'host'}, $row->{'share'}, $row->{'num'}, $tar_file) && next;
423                  } else {                  } else {
# Line 421  while (my $row = $sth->fetchrow_hashref) Line 425  while (my $row = $sth->fetchrow_hashref)
425                  }                  }
426          }          }
427    
428          print curr_time, " creating $curr_backup/$num_backups ", $row->{'host'}, ":", $row->{'share'}, " #", $row->{'num'}, " -> $tar_file";          print curr_time, " creating $curr_backup/$num_backups ", $row->{host}, ":", $row->{share}, " #", $row->{num},
429                    " ", strftime('%Y-%m-%d', localtime($row->{date})), " -> $tar_file";
430    
431          my $t = time();          my $t = time();
432    

Legend:
Removed from v.293  
changed lines
  Added in v.294

  ViewVC Help
Powered by ViewVC 1.1.26