]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: restore: improve warning for restoring container with same ID
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 5 Jul 2022 08:52:39 +0000 (10:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 7 Jul 2022 08:03:39 +0000 (10:03 +0200)
It's not clear to users that the "VM data" includes mount point
volumes including those that are not marked for backup. This is
different from VM restore, where volumes attached at drives not
present in the backup will be kept around as unused volumes.

Several (supposedly newer) users got tripped up by this over the
years, the latest report being [0]. The long term plan is to make the
restore dialog more flexible to be able to select actions for disks
individually, but that will take a bit of time. In the mean time, make
the warning more explicit.

[0]: https://forum.proxmox.com/threads/111760/#post-482045

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
www/manager6/window/Restore.js

index 6738d26fc93f2de4fb2d30f3461282668eeb6fc5..f3b51c813756baf24bc077737114fb3f921f6dff 100644 (file)
@@ -92,7 +92,13 @@ Ext.define('PVE.window.Restore', {
            };
 
            if (view.vmid) {
-               confirmMsg += '. ' + gettext('This will permanently erase current VM data.');
+               confirmMsg += `. ${Ext.String.format(
+                   gettext('This will permanently erase current {0} data.'),
+                   view.vmtype === 'lxc' ? 'CT' : 'VM',
+               )}`;
+               if (view.vmtype === 'lxc') {
+                   confirmMsg += ` ${gettext('Mount point volumes are also erased.')}`;
+               }
                Ext.Msg.confirm(gettext('Confirm'), confirmMsg, function(btn) {
                    if (btn === 'yes') {
                        executeRestore();