293 |
|
|
294 |
} |
} |
295 |
|
|
296 |
|
sub getGzipSize($$) |
297 |
|
{ |
298 |
|
my ($hostID, $backupNum) = @_; |
299 |
|
my $ret; |
300 |
|
my $sql; |
301 |
|
my $dbh = get_dbh(); |
302 |
|
|
303 |
|
$sql = q{ |
304 |
|
SELECT hosts.name as host, |
305 |
|
shares.name as share, |
306 |
|
backups.num as backupnum |
307 |
|
FROM hosts, backups, shares |
308 |
|
WHERE shares.id=backups.shareid AND |
309 |
|
hosts.id =backups.hostid AND |
310 |
|
hosts.id=? AND |
311 |
|
backups.num=?; |
312 |
|
}; |
313 |
|
my $sth = $dbh->prepare($sql); |
314 |
|
$sth->execute($hostID, $backupNUM); |
315 |
|
my $row = $res->fetchrow_hashref(); |
316 |
|
|
317 |
|
my (undef,undef,undef,undef,undef,undef,undef,$ret,undef,undef,undef,undef,undef) = |
318 |
|
stat( $Conf{InstallDir}.'/'.$Conf{GzipTempDir}.'/'. |
319 |
|
getGzipName($row->{'host'}, $row->{share}, $row->{'backupnum'})); |
320 |
|
|
321 |
|
return $ret; |
322 |
|
} |
323 |
|
|
324 |
sub getBackupsNotBurned() { |
sub getBackupsNotBurned() { |
325 |
|
|
326 |
my $dbh = get_dbh(); |
my $dbh = get_dbh(); |