From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 1FFB21FF09C for ; Mon, 02 Nov 2026 00:22:26 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 011C2216E6; Mon, 02 Nov 2026 00:22:16 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH guest-common 1/5] vzdump: add option to stop starting guest backups after a time window Date: Mon, 2 Nov 2026 00:20:24 +0100 Message-ID: <20261101232205.976807-2-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261101232205.976807-1-t.lamprecht@proxmox.com> References: <20261101232205.976807-1-t.lamprecht@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793575330204 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.373 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: J2G5VCQT5YY2MGQ3SHSKDYVW4HGAXJJX X-Message-ID-Hash: J2G5VCQT5YY2MGQ3SHSKDYVW4HGAXJJX X-MailFrom: t.lamprecht@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: A backup job can easily run into business hours, when the node has to wait for other jobs first, or when backing up the guests takes longer than planned. Nothing prevents starting further guests at that point. The new 'start-window' option defines how many minutes after the scheduled start of a job, or the start of a manual backup, guest backups may still begin. Guest backups already running finish normally, and guests not started in time are reported as skipped, so a shortened run stays visible. The job runner passes the scheduled start as 'job-scheduled-time'. Like the job ID, it is left out of the command line shown in the task log. Signed-off-by: Thomas Lamprecht --- src/PVE/VZDump/Common.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/PVE/VZDump/Common.pm b/src/PVE/VZDump/Common.pm index f98c9ae..538405b 100644 --- a/src/PVE/VZDump/Common.pm +++ b/src/PVE/VZDump/Common.pm @@ -348,6 +348,15 @@ my $confdesc = { optional => 1, default => 0, }, + 'start-window' => { + type => 'integer', + description => "Do not start backing up further guests once this many minutes have" + . " passed since the scheduled start of a backup job, or since the start of a manual" + . " backup. Running guest backups finish, and the remaining guests are reported as" + . " skipped.", + optional => 1, + minimum => 1, + }, stopwait => { type => 'integer', description => "Maximal time to wait until a guest system is stopped (minutes).", @@ -554,7 +563,8 @@ sub command_line { || $p eq 'dow' || $p eq 'stdout' || $p eq 'enabled' - || $p eq 'job-id'; + || $p eq 'job-id' + || $p eq 'job-scheduled-time'; my $v = $param->{$p}; my $pd = $confdesc->{$p} || die "no such vzdump option '$p'\n"; if ($p eq 'exclude-path') { -- 2.47.3