168 |
my $size = (stat( "$tar_dir/$tarfilename" ))[7] || die "can't stat $tar_dir/$tarfilename"; |
my $size = (stat( "$tar_dir/$tarfilename" ))[7] || die "can't stat $tar_dir/$tarfilename"; |
169 |
|
|
170 |
if ($size > $Conf{MaxArchiveSize}) { |
if ($size > $Conf{MaxArchiveSize}) { |
171 |
print STDERR " part bigger than media $size > $Conf{MaxArchiveSize} }}" if ($debug); |
print ", part bigger than media $size > $Conf{MaxArchiveSize}\n"; |
172 |
$same = 0; |
return 0; |
|
last; |
|
173 |
} |
} |
174 |
|
|
175 |
print ", $size bytes"; |
print ", $size bytes"; |
190 |
|
|
191 |
if ($tar_size > $Conf{MaxArchiveFileSize}) { |
if ($tar_size > $Conf{MaxArchiveFileSize}) { |
192 |
print ", part $tarfilename is too big $tar_size > $Conf{MaxArchiveFileSize}\n"; |
print ", part $tarfilename is too big $tar_size > $Conf{MaxArchiveFileSize}\n"; |
193 |
$same = 0; |
return 0; |
|
last; |
|
194 |
} |
} |
195 |
|
|
196 |
} |
} |
296 |
my $curr_backup = 1; |
my $curr_backup = 1; |
297 |
|
|
298 |
while (my $row = $sth->fetchrow_hashref) { |
while (my $row = $sth->fetchrow_hashref) { |
299 |
|
|
300 |
|
$curr_backup++; |
301 |
|
|
302 |
my $tar_file = BackupPC::SearchLib::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'}); |
my $tar_file = BackupPC::SearchLib::getGzipName($row->{'host'}, $row->{'share'}, $row->{'num'}); |
303 |
|
|
304 |
# this will return -1 if file doesn't exist |
# this will return -1 if file doesn't exist |
314 |
} |
} |
315 |
} |
} |
316 |
|
|
317 |
print curr_time, " $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'}, " -> $tar_file"; |
|
$curr_backup++; |
|
318 |
|
|
319 |
my $t = time(); |
my $t = time(); |
320 |
|
|