--- trunk/bin/BackupPC_incPartsUpdate 2005/10/10 13:39:10 158 +++ trunk/bin/BackupPC_incPartsUpdate 2005/10/10 14:05:09 167 @@ -19,7 +19,7 @@ die "can't find $tarIncCreate: $!\n" unless (-x $tarIncCreate); -my $debug = 1; +my $debug = 0; $|=1; my $start_t = time(); @@ -77,6 +77,7 @@ $sth->execute(); my $sth_inc_size = $dbh->prepare(qq{ update backups set inc_size = ? where id = ? }); +my $sth_inc_deleted = $dbh->prepare(qq{ update backups set inc_deleted = ? where id = ? }); %BackupPC::SearchLib::Conf = %Conf; @@ -93,9 +94,16 @@ my $size = (stat( "$tar_dir/$tar_file" ))[7]; - print fmt_time(time() - $t)," $size bytes\n"; + print " dur: ",fmt_time(time() - $t)," $size bytes"; - $sth_inc_size->execute($size, $row->{'backup_id'}); + if ($size > 45) { + $sth_inc_size->execute($size, $row->{'backup_id'}); + } else { + $sth_inc_deleted->execute(1, $row->{'backup_id'}); + unlink "$tar_dir/$tar_file" || die "can't delete $tar_dir/$tar_file: $!\n"; + print " EMPTY"; + } + print "\n"; $dbh->commit;