public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
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	[thread overview]
Message-ID: <20261101232205.976807-2-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20261101232205.976807-1-t.lamprecht@proxmox.com>

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 <t.lamprecht@proxmox.com>
---
 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





  reply	other threads:[~2026-11-01 23:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 23:20 [PATCH guest-common,manager,docs 0/5] backup jobs: add a start window Thomas Lamprecht
2026-11-01 23:20 ` Thomas Lamprecht [this message]
2026-11-01 23:20 ` [PATCH manager 2/5] jobs: pass scheduled run time to job plugins Thomas Lamprecht
2026-11-01 23:20 ` [PATCH manager 3/5] vzdump: honor start window for guest backups Thomas Lamprecht
2026-11-01 23:20 ` [PATCH manager 4/5] ui: backup job: add start window option Thomas Lamprecht
2026-11-01 23:20 ` [PATCH docs 5/5] vzdump: document the start window 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=20261101232205.976807-2-t.lamprecht@proxmox.com \
    --to=t.lamprecht@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 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