5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-06 13:17:56 +03:00

vzdump: output sparseness again

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-08-20 10:22:44 +02:00
parent bafae3ec84
commit d35412a32a

View File

@ -400,6 +400,12 @@ my $query_backup_status_loop = sub {
}
my $duration = time() - $starttime;
if ($last_zero) {
my $zero_per = $last_target ? int(($last_zero * 100)/$last_target) : 0;
my $zero_h = bytes_to_human($last_zero, 2);
$self->loginfo("backup is sparse: $zero_h (${zero_per}%) total zero data");
}
if ($transferred) {
my $transferred_h = bytes_to_human($transferred, 2);
if ($reused) {
@ -415,12 +421,6 @@ my $query_backup_status_loop = sub {
}
}
if (!defined($pbs_features) && $last_zero) {
my $zero_per = $last_target ? int(($last_zero * 100)/$last_target) : 0;
my $zero_h = bytes_to_human($last_zero, 2);
$self->loginfo("Backup is sparse: ${zero_per}% ($zero_h) zero data");
}
return {
total => $last_total,
reused => $reused,