From: Jakob Klocker <j.klocker@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager v3 3/4] ui: backup: add error behavior and retry options
Date: Mon, 16 Nov 2026 11:13:43 +0100 [thread overview]
Message-ID: <20261116101344.140523-4-j.klocker@proxmox.com> (raw)
In-Reply-To: <20261116101344.140523-1-j.klocker@proxmox.com>
Expose the `error-behavior` and `max-retries` vzdump parameters in the
scheduled datacenter backup and in the manual backup window.
New backup jobs preselect `retry`, as suggested in the bug report,
while existing jobs keep their configuration when edited. The schema
default stays `ignore`, so existing jobs, CLI and API usage keep their
current behavior. The manual backup window uses the node's defaults
from /etc/vzdump.conf.
The manual backup window only offers `retry` and `ignore`, since it
backs up a single guest, where `retry` and `retry-immediately` behave
the same. The width of the scheduled backup job window is increased
from 720 to 750 pixels so the new fields fit without cutting off their
labels.
Signed-off-by: Jakob Klocker <j.klocker@proxmox.com>
---
www/manager6/dc/Backup.js | 2 +-
www/manager6/panel/BackupAdvancedOptions.js | 52 +++++++++++++++++++
www/manager6/window/Backup.js | 56 ++++++++++++++++++++-
3 files changed, 108 insertions(+), 2 deletions(-)
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index d3db9d9c..b640fa1a 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -7,7 +7,7 @@ Ext.define('PVE.dc.BackupEdit', {
defaultFocus: undefined,
subject: gettext('Backup Job'),
- width: 720,
+ width: 750,
bodyPadding: 0,
url: '/api2/extjs/cluster/backup',
diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js
index fe8cc3bf..5023cdad 100644
--- a/www/manager6/panel/BackupAdvancedOptions.js
+++ b/www/manager6/panel/BackupAdvancedOptions.js
@@ -24,6 +24,11 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
me.lookup('fleecingStorage').setDisabled(!value);
},
+ errorBehaviorChange: function (field, value) {
+ let me = this;
+ me.lookup('maxRetriesField').setDisabled(value === 'ignore');
+ },
+
control: {
'proxmoxcheckbox[reference=fleecingEnabled]': {
change: 'toggleFleecing',
@@ -117,6 +122,53 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
},
items: [
+ {
+ xtype: 'pveTwoColumnContainer',
+ startColumn: {
+ xtype: 'proxmoxKVComboBox',
+ fieldLabel: gettext('Error Behavior'),
+ name: 'error-behavior',
+ comboItems: [
+ ['__default__', Proxmox.Utils.defaultText],
+ ['retry', gettext('Retry at end of job')],
+ ['retry-immediately', gettext('Retry immediately')],
+ ['ignore', gettext('Ignore')],
+ ],
+ cbind: {
+ value: (get) => (get('isCreate') ? 'retry' : '__default__'),
+ deleteEmpty: '{!isCreate}',
+ },
+ listeners: {
+ change: 'errorBehaviorChange',
+ },
+ },
+ endFlex: 2,
+ endColumn: {
+ xtype: 'displayfield',
+ value: `${gettext('How to handle guest backup failures.')} ${Ext.String.format(gettext('Schema default: {0}'), gettext('Ignore'))}`,
+ },
+ },
+ {
+ xtype: 'pveTwoColumnContainer',
+ startColumn: {
+ xtype: 'proxmoxintegerfield',
+ fieldLabel: gettext('Max Retries'),
+ name: 'max-retries',
+ minValue: 1,
+ maxValue: 10,
+ reference: 'maxRetriesField',
+ allowBlank: true,
+ emptyText: Proxmox.Utils.defaultText,
+ cbind: {
+ deleteEmpty: '{!isCreate}',
+ },
+ },
+ endFlex: 2,
+ endColumn: {
+ xtype: 'displayfield',
+ value: `${gettext('Maximum number of retries before giving up on a guest.')} ${Ext.String.format(gettext('Schema default: {0}'), 5)}`,
+ },
+ },
{
xtype: 'pveTwoColumnContainer',
startColumn: {
diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js
index 0caada65..3ce1d69b 100644
--- a/www/manager6/window/Backup.js
+++ b/www/manager6/window/Backup.js
@@ -55,6 +55,34 @@ Ext.define('PVE.window.Backup', {
},
});
+ let maxRetriesField = Ext.create({
+ xtype: 'proxmoxintegerfield',
+ fieldLabel: gettext('Max Retries'),
+ name: 'max-retries',
+ minValue: 1,
+ maxValue: 10,
+ allowBlank: true,
+ emptyText: '5',
+ disabled: true,
+ });
+
+ let errorBehaviorSelector = Ext.create({
+ xtype: 'proxmoxKVComboBox',
+ fieldLabel: gettext('Error Behavior'),
+ name: 'error-behavior',
+ value: 'ignore',
+ deleteEmpty: false,
+ comboItems: [
+ ['retry', gettext('Retry')],
+ ['ignore', gettext('Ignore')],
+ ],
+ listeners: {
+ change: function (field, value) {
+ maxRetriesField.setDisabled(value === 'ignore');
+ },
+ },
+ });
+
let pbsChangeDetectionModeSelector = Ext.create({
xtype: 'proxmoxKVComboBox',
flex: 1,
@@ -196,6 +224,17 @@ Ext.define('PVE.window.Backup', {
);
}
+ if (!initialDefaults && data['error-behavior'] !== undefined) {
+ // both retry strategies behave the same for a single guest
+ let behavior = data['error-behavior'];
+ errorBehaviorSelector.setValue(
+ behavior === 'retry-immediately' ? 'retry' : behavior,
+ );
+ }
+ if (!initialDefaults && data['max-retries'] !== undefined) {
+ maxRetriesField.setValue(data['max-retries']);
+ }
+
initialDefaults = true;
// always update storage dependent properties
@@ -250,7 +289,14 @@ Ext.define('PVE.window.Backup', {
bodyPadding: 10,
border: false,
column1: [storagesel, modeSelector, protectedCheckbox, pbsChangeDetection],
- column2: [compressionSelector, notificationModeSelector, mailtoField, removeCheckbox],
+ column2: [
+ compressionSelector,
+ notificationModeSelector,
+ mailtoField,
+ removeCheckbox,
+ errorBehaviorSelector,
+ maxRetriesField,
+ ],
columnB: [
{
xtype: 'textareafield',
@@ -342,6 +388,14 @@ Ext.define('PVE.window.Backup', {
);
}
+ if (values['error-behavior']) {
+ params['error-behavior'] = values['error-behavior'];
+ }
+
+ if (values['max-retries'] !== undefined && values['max-retries'] !== '') {
+ params['max-retries'] = values['max-retries'];
+ }
+
Proxmox.Utils.API2Request({
url: '/nodes/' + me.nodename + '/vzdump',
params: params,
--
2.47.3
next prev parent reply other threads:[~2026-11-16 10:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 10:13 [PATCH docs/guest-common/manager v3 0/4] fix #6464: backup: add backup retry strategies Jakob Klocker
2026-11-16 10:13 ` [PATCH pve-guest-common v3 1/4] vzdump: add error-behavior and max-retries options Jakob Klocker
2026-11-16 10:13 ` [PATCH pve-manager v3 2/4] fix #6464: vzdump: add retry strategies for failed guest backups Jakob Klocker
2026-11-16 10:13 ` Jakob Klocker [this message]
2026-11-16 10:13 ` [PATCH pve-docs v3 4/4] vzdump: document backup retry options Jakob Klocker
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=20261116101344.140523-4-j.klocker@proxmox.com \
--to=j.klocker@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