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 739E31FF09C for ; Mon, 02 Nov 2026 13:00:10 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 081E821774; Mon, 02 Nov 2026 12:59:55 +0100 (CET) From: Jakob Klocker To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager 3/3] ui: backup: add error behavior and retry options Date: Mon, 2 Nov 2026 12:58:51 +0100 Message-ID: <20261102115851.171429-4-j.klocker@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261102115851.171429-1-j.klocker@proxmox.com> References: <20261102115851.171429-1-j.klocker@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793620790191 X-SPAM-LEVEL: Spam detection results: 0 AWL 1.464 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: LNEPDOBFSRGRQUNO727MSGCYS2LHWJR2 X-Message-ID-Hash: LNEPDOBFSRGRQUNO727MSGCYS2LHWJR2 X-MailFrom: j.klocker@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: Expose the `error-behavior` and `max-retries` vzdump parameters in the scheduled datacenter backup and in the manual backup window. When creating a new backup job or starting a manual backup, the UI defaults to `retry` with a maximum of 5 retries. 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 --- www/manager6/dc/Backup.js | 2 +- www/manager6/panel/BackupAdvancedOptions.js | 52 +++++++++++++++++++++ www/manager6/window/Backup.js | 47 ++++++++++++++++++- 3 files changed, 99 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..b06011fe 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', + value: 'retry', + comboItems: [ + ['retry', gettext('Retry at end of job')], + ['retry-immediately', gettext('Retry immediately')], + ['ignore', gettext('Ignore')], + ], + cbind: { + deleteEmpty: '{!isCreate}', + }, + listeners: { + change: 'errorBehaviorChange', + }, + }, + endFlex: 2, + endColumn: { + xtype: 'displayfield', + value: gettext('How to handle a guest backup failure.'), + }, + }, + { + xtype: 'pveTwoColumnContainer', + startColumn: { + xtype: 'proxmoxintegerfield', + fieldLabel: gettext('Max Retries'), + name: 'max-retries', + minValue: 1, + maxValue: 10, + reference: 'maxRetriesField', + value: 5, + allowBlank: true, + emptyText: '5', + cbind: { + deleteEmpty: '{!isCreate}', + }, + }, + endFlex: 2, + endColumn: { + xtype: 'displayfield', + value: gettext('Maximum number of retries before giving up on a guest.'), + }, + }, { xtype: 'pveTwoColumnContainer', startColumn: { diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js index 7c1c54de..e1b7c915 100644 --- a/www/manager6/window/Backup.js +++ b/www/manager6/window/Backup.js @@ -54,6 +54,36 @@ Ext.define('PVE.window.Backup', { }, }); + let maxRetriesField = Ext.create({ + xtype: 'proxmoxintegerfield', + fieldLabel: gettext('Max Retries'), + name: 'max-retries', + minValue: 1, + maxValue: 10, + value: 5, + allowBlank: true, + emptyText: '5', + advanced: true, + }); + + let errorBehaviorSelector = Ext.create({ + xtype: 'proxmoxKVComboBox', + fieldLabel: gettext('Error Behavior'), + name: 'error-behavior', + value: 'retry', + deleteEmpty: false, + advanced: true, + comboItems: [ + ['retry', gettext('Retry')], + ['ignore', gettext('Ignore')], + ], + listeners: { + change: function (field, value) { + maxRetriesField.setDisabled(value === 'ignore'); + }, + }, + }); + let pbsChangeDetectionModeSelector = Ext.create({ xtype: 'proxmoxKVComboBox', flex: 1, @@ -249,7 +279,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', @@ -341,6 +378,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