all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com, pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v2 8/8] pbs-restore: set restore bandwidth limit for volumes
Date: Wed, 16 Sep 2026 16:48:43 +0200	[thread overview]
Message-ID: <20260916144843.567913-9-c.ebner@proxmox.com> (raw)
In-Reply-To: <20260916144843.567913-1-c.ebner@proxmox.com>

If configured, pass the optional bandwidth limit parameter to
pbs-restore. Since configured values are provided in multiples
of 1k, extend the value by this scale. By using the chunk stream
output limit imposed by `rate-limit` rather than download bandwidth
limit imposed by `bw-limit`, the restore is limited by output stream
thereby taking decompression and zero chunks into account.

Bumps runtime dependency on pve-qemu in order to assure the flags
are available.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 debian/control        | 2 +-
 src/PVE/QemuServer.pm | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index c236b690..74ccd663 100644
--- a/debian/control
+++ b/debian/control
@@ -61,7 +61,7 @@ Depends: conntrack,
          pve-edk2-firmware-ovmf (>= 4.2025.05-2) [amd64],
          pve-firewall (>= 6.0.3),
          pve-ha-manager (>= 5.0.3),
-         pve-qemu-kvm (>= 11.0.3-3),
+         pve-qemu-kvm (>= 11.0.3-4),
          python3-virt-firmware,
          socat,
          swtpm,
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 759f7db2..2da05f56 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -7036,6 +7036,9 @@ sub restore_proxmox_backup_archive {
 
             push @$pbs_restore_cmd, '--format', $d->{format} if $d->{format};
             push @$pbs_restore_cmd, '--keyfile', $keyfile if -e $keyfile;
+            if (defined($options->{bwlimit})) {
+                push @$pbs_restore_cmd, '--rate-limit', "$options->{bwlimit}KiB";
+            }
 
             if (PVE::Storage::volume_has_feature($storecfg, 'sparseinit', $volid)) {
                 push @$pbs_restore_cmd, '--skip-zero';
-- 
2.47.3





      parent reply	other threads:[~2026-09-16 14:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 14:48 [PATCH many v2 0/8] fix #7530: Implement download bandwidth and restore limits for pbs-restore Christian Ebner
2026-09-16 14:48 ` [PATCH proxmox v2 1/8] pbs-api-types: expose ClientRateLimitConfig fields as pub Christian Ebner
2026-09-16 14:48 ` [PATCH proxmox-backup-qemu v2 2/8] commands/restore: fix useless borrow clippy warnings for archive names Christian Ebner
2026-09-16 14:48 ` [PATCH proxmox-backup-qemu v2 3/8] commands: fix clippy error for reimplementing Result::ok() Christian Ebner
2026-09-16 14:48 ` [PATCH proxmox-backup-qemu v2 4/8] commands: extend stricter type checks for guest config archive names Christian Ebner
2026-09-16 14:48 ` [PATCH proxmox-backup-qemu v2 5/8] restore: implement `bw-limit` parameter imposing download rate limits Christian Ebner
2026-09-16 14:48 ` [PATCH proxmox-backup-qemu v2 6/8] restore: implement `rate-limit` imposing chunk data stream limits Christian Ebner
2026-09-16 14:48 ` [PATCH pve-qemu v2 7/8] fix #7530: pbs-restore: expose optional rate limit parameters Christian Ebner
2026-09-16 14:48 ` Christian Ebner [this message]

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=20260916144843.567913-9-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=pve-devel@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal