public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@pve.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 2/2] vzdump: show "reused" message even if nothing was transferred
Date: Thu, 20 Aug 2020 15:32:23 +0200	[thread overview]
Message-ID: <20200820133223.24435-2-s.reiter@proxmox.com> (raw)
In-Reply-To: <20200820133223.24435-1-s.reiter@proxmox.com>

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 | 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





  reply	other threads:[~2020-08-20 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 13:32 [pve-devel] [PATCH qemu-server 1/2] vzdump: allow bandwidth limit for PBS backup too Stefan Reiter
2020-08-20 13:32 ` Stefan Reiter [this message]
2020-08-20 13:55   ` [pve-devel] applied: [PATCH qemu-server 2/2] vzdump: show "reused" message even if nothing was transferred Thomas Lamprecht
2020-08-20 13:55 ` [pve-devel] applied: [PATCH qemu-server 1/2] vzdump: allow bandwidth limit for PBS backup too Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200820133223.24435-2-s.reiter@proxmox.com \
    --to=s.reiter@proxmox.com \
    --cc=pve-devel@pve.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal