]> git.proxmox.com Git - qemu-server.git/commitdiff
vzdump: show "reused" message even if nothing was transferred
authorStefan Reiter <s.reiter@proxmox.com>
Thu, 20 Aug 2020 13:32:23 +0000 (15:32 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 20 Aug 2020 13:54:54 +0000 (15:54 +0200)
This still works even if all drives were clean. It then shows the very
magical line:

  INFO: backup was done incrementally, reused 34.00 GiB (100%)

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
PVE/VZDump/QemuServer.pm

index 4640009066469ec69e68594706e7df97f023aebd..e9619602a63be2488953302d546ec614725e2727 100644 (file)
@@ -430,13 +430,13 @@ my $query_backup_status_loop = sub {
        my $zero_h = bytes_to_human($last_zero, 2);
        $self->loginfo("backup is sparse: $zero_h (${zero_per}%) total zero data");
     }
+    if ($reused) {
+       my $reused_h = bytes_to_human($reused, 2);
+       my $reuse_per = int($reused * 100 / $last_total);
+       $self->loginfo("backup was done incrementally, reused $reused_h (${reuse_per}%)");
+    }
     if ($transferred) {
        my $transferred_h = bytes_to_human($transferred, 2);
-       if ($reused) {
-           my $reused_h = bytes_to_human($reused, 2);
-           my $reuse_per = int($reused * 100 / $last_total);
-           $self->loginfo("backup was done incrementally, reused $reused_h (${reuse_per}%)");
-       }
        if ($duration) {
            my $mbps = $get_mbps->($transferred, $duration);
            $self->loginfo("transferred $transferred_h in $duration seconds ($mbps)");