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 |
} ); |
} ); |
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(); |