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 F02541FF0DE for ; Thu, 19 Nov 2026 11:38:16 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E51C721891; Thu, 19 Nov 2026 11:36:51 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH manager v4 31/41] ui: restore: allow overwriting a guest with a backup of another guest Date: Thu, 19 Nov 2026 11:34:17 +0100 Message-ID: <20261119103551.1666964-32-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261119103551.1666964-1-t.lamprecht@proxmox.com> References: <20261119103551.1666964-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: 1795084557238 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.161 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: ZO53YS7QF4YHZSZKRJ724Y7QJACRWFI6 X-Message-ID-Hash: ZO53YS7QF4YHZSZKRJ724Y7QJACRWFI6 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: Restoring a backup with a different uid over an existing guest requires 'allow-identity-mismatch', including backups of a former guest with the same VMID. The restore task can reject such a backup, but the web UI could not pass the override, leaving no way to proceed there. Offer an unchecked checkbox whenever the restore window overwrites an existing guest. Keep it independent of the overwrite option so an accidentally selected backup is still rejected by default. The restore task decides whether the identities match; the UI does not try to predict that result. With the override, a guest that already had an identity keeps it. Signed-off-by: Thomas Lamprecht Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak --- no changes since v1 www/manager6/window/Restore.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js index 60266ec1..27df7d53 100644 --- a/www/manager6/window/Restore.js +++ b/www/manager6/window/Restore.js @@ -47,6 +47,9 @@ Ext.define('PVE.window.Restore', { if (values['live-restore']) { params['live-restore'] = 1; } + if (values['allow-identity-mismatch']) { + params['allow-identity-mismatch'] = 1; + } if (values.storage) { params.storage = values.storage; } @@ -256,6 +259,21 @@ Ext.define('PVE.window.Restore', { }, ]; + if (me.vmid) { + items.push({ + xtype: 'proxmoxcheckbox', + name: 'allow-identity-mismatch', + boxLabel: gettext('Allow restoring a backup of another guest'), + checked: false, + autoEl: { + tag: 'div', + 'data-qtip': gettext( + 'Also required for a backup of a previous guest with the same VMID. The existing guest keeps its identity.', + ), + }, + }); + } + if (me.vmtype === 'lxc') { items.push({ xtype: 'radiogroup', -- 2.47.3