if ($fh) {
return if ($current_tar_size == 0);
- print STDERR " $part";
+ print STDERR "\n\t+ $part:";
#
# Finish with two null 512 byte headers,
my $size = (stat( $file . '.tar.gz' ))[7] || die "can't stat ${file}.tar.gz";
+ print "$file, $size bytes, $items_in_part items";
+
$sth_backup_parts->execute(
$backup_id,
$part,
} else {
print STDERR " [last]" if ($opts{v});
move("${tar_path}", "${tar_path_final}");
+
+ # if this archive was single part, remove it
+ foreach my $suffix (qw/.tar.gz .md5/) {
+ my $path = $tar_path_final . $suffix;
+ unlink $path if (-e $path);
+ }
}
$sth_inc_size->execute(
$backup_id
);
- print STDERR ", $total_increment_size bytes\n" if ($opts{v});
+ print "\n\ttotal $total_increment_size bytes";
return;
}