19 |
|
|
20 |
die "can't find $tarIncCreate: $!\n" unless (-x $tarIncCreate); |
die "can't find $tarIncCreate: $!\n" unless (-x $tarIncCreate); |
21 |
|
|
22 |
my $debug = 1; |
my $debug = 0; |
23 |
$|=1; |
$|=1; |
24 |
|
|
25 |
my $start_t = time(); |
my $start_t = time(); |
77 |
$sth->execute(); |
$sth->execute(); |
78 |
|
|
79 |
my $sth_inc_size = $dbh->prepare(qq{ update backups set inc_size = ? where id = ? }); |
my $sth_inc_size = $dbh->prepare(qq{ update backups set inc_size = ? where id = ? }); |
80 |
|
my $sth_inc_deleted = $dbh->prepare(qq{ update backups set inc_deleted = ? where id = ? }); |
81 |
|
|
82 |
%BackupPC::SearchLib::Conf = %Conf; |
%BackupPC::SearchLib::Conf = %Conf; |
83 |
|
|
94 |
|
|
95 |
my $size = (stat( "$tar_dir/$tar_file" ))[7]; |
my $size = (stat( "$tar_dir/$tar_file" ))[7]; |
96 |
|
|
97 |
print fmt_time(time() - $t)," $size bytes\n"; |
print " dur: ",fmt_time(time() - $t)," $size bytes"; |
98 |
|
|
99 |
$sth_inc_size->execute($size, $row->{'backup_id'}); |
if ($size > 45) { |
100 |
|
$sth_inc_size->execute($size, $row->{'backup_id'}); |
101 |
|
} else { |
102 |
|
$sth_inc_deleted->execute(1, $row->{'backup_id'}); |
103 |
|
unlink "$tar_dir/$tar_file" || die "can't delete $tar_dir/$tar_file: $!\n"; |
104 |
|
print " EMPTY"; |
105 |
|
} |
106 |
|
print "\n"; |
107 |
|
|
108 |
$dbh->commit; |
$dbh->commit; |
109 |
|
|