[pve-devel] [PATCH qemu-server 2/2] vzdump: show "reused" message even if nothing was transferred

Stefan Reiter s.reiter at proxmox.com
Thu Aug 20 15:32:23 CEST 2020


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 at proxmox.com>
---
 PVE/VZDump/QemuServer.pm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index 4640009..e961960 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -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)");
-- 
2.20.1






More information about the pve-devel mailing list