From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 011D61FF0B7 for ; Tue, 25 Aug 2026 11:19:01 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A9D3E2177A; Tue, 25 Aug 2026 11:18:09 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com, pve-devel@lists.proxmox.com Subject: [PATCH qemu-server 8/8] pbs-restore: set restore bandwidth limit for volumes Date: Tue, 25 Aug 2026 11:17:40 +0200 Message-ID: <20260825091741.162883-9-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260825091741.162883-1-c.ebner@proxmox.com> References: <20260825091741.162883-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787649453026 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.713 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: EX5WHV7B6X5EHINDF7HJYD5I4N4WNTEU X-Message-ID-Hash: EX5WHV7B6X5EHINDF7HJYD5I4N4WNTEU X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- debian/control | 2 +- src/PVE/QemuServer.pm | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index a9949d5a..bd7c4b37 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 63d8c135..e873d602 100644 --- a/src/PVE/QemuServer.pm +++ b/src/PVE/QemuServer.pm @@ -7086,6 +7086,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