* [pve-devel] [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter @ 2021-03-03 11:50 Fabian Ebner 2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 2/3] partially fix #2745: vzdump: use default for " Fabian Ebner ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Fabian Ebner @ 2021-03-03 11:50 UTC (permalink / raw) To: pve-devel Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> --- First version here (it's been a while): https://lists.proxmox.com/pipermail/pve-devel/2020-October/045585.html Changes from v1: * Space lines more evenly to get below 80 char limit. PVE/VZDump/Common.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/VZDump/Common.pm b/PVE/VZDump/Common.pm index 86cb7bd..bc38343 100644 --- a/PVE/VZDump/Common.pm +++ b/PVE/VZDump/Common.pm @@ -231,7 +231,8 @@ my $confdesc = { }), remove => { type => 'boolean', - description => "Remove old backup files if there are more than 'maxfiles' backup files.", + description => "Remove old backup files if there are more than " . + "'maxfiles' backup files or prune according to 'prune-backups'.", optional => 1, default => 1, }, -- 2.20.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] [PATCH v2 manager 2/3] partially fix #2745: vzdump: use default for remove parameter 2021-03-03 11:50 [pve-devel] [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter Fabian Ebner @ 2021-03-03 11:50 ` Fabian Ebner 2021-03-05 20:34 ` [pve-devel] applied: " Thomas Lamprecht 2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1 Fabian Ebner 2021-03-05 20:34 ` [pve-devel] applied: [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter Thomas Lamprecht 2 siblings, 1 reply; 8+ messages in thread From: Fabian Ebner @ 2021-03-03 11:50 UTC (permalink / raw) To: pve-devel The initial default from the $confdesc is 1 anyways, and like this changing the default in /etc/vzdump.conf to 0 actually works. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> --- PVE/VZDump.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 0345d2f3..02858d8e 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -449,8 +449,6 @@ sub new { my $defaults = read_vzdump_defaults(); - $opts->{remove} = 1 if !defined($opts->{remove}); - foreach my $k (keys %$defaults) { next if $k eq 'exclude-path' || $k eq 'prune-backups'; # dealt with separately if ($k eq 'dumpdir' || $k eq 'storage') { -- 2.20.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] applied: [PATCH v2 manager 2/3] partially fix #2745: vzdump: use default for remove parameter 2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 2/3] partially fix #2745: vzdump: use default for " Fabian Ebner @ 2021-03-05 20:34 ` Thomas Lamprecht 0 siblings, 0 replies; 8+ messages in thread From: Thomas Lamprecht @ 2021-03-05 20:34 UTC (permalink / raw) To: Proxmox VE development discussion, Fabian Ebner On 03.03.21 12:50, Fabian Ebner wrote: > The initial default from the $confdesc is 1 anyways, and like > this changing the default in /etc/vzdump.conf to 0 actually works. > > Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> > --- > PVE/VZDump.pm | 2 -- > 1 file changed, 2 deletions(-) > > applied, thanks! ^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1 2021-03-03 11:50 [pve-devel] [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter Fabian Ebner 2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 2/3] partially fix #2745: vzdump: use default for " Fabian Ebner @ 2021-03-03 11:50 ` Fabian Ebner 2021-03-05 20:34 ` Thomas Lamprecht 2021-03-05 20:34 ` [pve-devel] applied: [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter Thomas Lamprecht 2 siblings, 1 reply; 8+ messages in thread From: Fabian Ebner @ 2021-03-03 11:50 UTC (permalink / raw) To: pve-devel A user with Datastore.AllocateSpace, VM.Audit, VM.Backup can already remove backups from the GUI manually, so it shouldn't be a problem if they can set the remove flag when starting a manual backup in the GUI. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> --- Changes from v1: * Rebase on current master. * Do not use the label 'Remove', because that is rather confusing, instead use 'Prune'. www/manager6/window/Backup.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js index 615073f3..d5b585bb 100644 --- a/www/manager6/window/Backup.js +++ b/www/manager6/window/Backup.js @@ -68,6 +68,17 @@ Ext.define('PVE.window.Backup', { name: 'mailto', emptyText: Proxmox.Utils.noneText, }, + { + xtype: 'proxmoxcheckbox', + name: 'remove', + checked: false, + uncheckedValue: 0, + fieldLabel: gettext('Prune'), + autoEl: { + tag: 'div', + 'data-qtip': gettext('Prune older backups afterwards'), + }, + }, ], }); @@ -82,7 +93,7 @@ Ext.define('PVE.window.Backup', { storage: storage, vmid: me.vmid, mode: values.mode, - remove: 0, + remove: values.remove, }; if (values.mailto) { -- 2.20.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1 2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1 Fabian Ebner @ 2021-03-05 20:34 ` Thomas Lamprecht 2021-03-09 10:28 ` Fabian Ebner 0 siblings, 1 reply; 8+ messages in thread From: Thomas Lamprecht @ 2021-03-05 20:34 UTC (permalink / raw) To: Proxmox VE development discussion, Fabian Ebner On 03.03.21 12:50, Fabian Ebner wrote: > A user with Datastore.AllocateSpace, VM.Audit, VM.Backup can already remove > backups from the GUI manually, so it shouldn't be a problem if they can set > the remove flag when starting a manual backup in the GUI. > > Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> > --- > > Changes from v1: > * Rebase on current master. > * Do not use the label 'Remove', because that is rather confusing, instead > use 'Prune'. > > www/manager6/window/Backup.js | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js > index 615073f3..d5b585bb 100644 > --- a/www/manager6/window/Backup.js > +++ b/www/manager6/window/Backup.js > @@ -68,6 +68,17 @@ Ext.define('PVE.window.Backup', { > name: 'mailto', > emptyText: Proxmox.Utils.noneText, > }, > + { > + xtype: 'proxmoxcheckbox', > + name: 'remove', > + checked: false, > + uncheckedValue: 0, > + fieldLabel: gettext('Prune'), > + autoEl: { > + tag: 'div', > + 'data-qtip': gettext('Prune older backups afterwards'), > + }, > + }, I find this confusing in the case the storage has no prune settings configured and also if there's one its intransparent as one cannot really tell which one. So I'd maybe only enable (or show?) this if it can actually do something, and in that case I'd also show the current settings (they could change in theory until the job is submitted, but not the norm and still better than nothing). > ], > }); > > @@ -82,7 +93,7 @@ Ext.define('PVE.window.Backup', { > storage: storage, > vmid: me.vmid, > mode: values.mode, > - remove: 0, > + remove: values.remove, > }; > > if (values.mailto) { > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1 2021-03-05 20:34 ` Thomas Lamprecht @ 2021-03-09 10:28 ` Fabian Ebner 2021-03-09 10:53 ` Fabian Ebner 0 siblings, 1 reply; 8+ messages in thread From: Fabian Ebner @ 2021-03-09 10:28 UTC (permalink / raw) To: Thomas Lamprecht, Proxmox VE development discussion On 05.03.21 21:34, Thomas Lamprecht wrote: > On 03.03.21 12:50, Fabian Ebner wrote: >> A user with Datastore.AllocateSpace, VM.Audit, VM.Backup can already remove >> backups from the GUI manually, so it shouldn't be a problem if they can set >> the remove flag when starting a manual backup in the GUI. >> >> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> >> --- >> >> Changes from v1: >> * Rebase on current master. >> * Do not use the label 'Remove', because that is rather confusing, instead >> use 'Prune'. >> >> www/manager6/window/Backup.js | 13 ++++++++++++- >> 1 file changed, 12 insertions(+), 1 deletion(-) >> >> diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js >> index 615073f3..d5b585bb 100644 >> --- a/www/manager6/window/Backup.js >> +++ b/www/manager6/window/Backup.js >> @@ -68,6 +68,17 @@ Ext.define('PVE.window.Backup', { >> name: 'mailto', >> emptyText: Proxmox.Utils.noneText, >> }, >> + { >> + xtype: 'proxmoxcheckbox', >> + name: 'remove', >> + checked: false, >> + uncheckedValue: 0, >> + fieldLabel: gettext('Prune'), >> + autoEl: { >> + tag: 'div', >> + 'data-qtip': gettext('Prune older backups afterwards'), >> + }, >> + }, > > I find this confusing in the case the storage has no prune settings configured and > also if there's one its intransparent as one cannot really tell which one. > So I'd maybe only enable (or show?) this if it can actually do something, and in > that case I'd also show the current settings (they could change in theory until > the job is submitted, but not the norm and still better than nothing). > > I don't think there is an API call to GET the currently configured vzdump properties yet. With that, we can set the other properties in the manual backup window (mailto, compression, etc.) to their currently configured values too. Also, if we pass along the previously retrieved prune settings as an API param, there is no race. >> ], >> }); >> >> @@ -82,7 +93,7 @@ Ext.define('PVE.window.Backup', { >> storage: storage, >> vmid: me.vmid, >> mode: values.mode, >> - remove: 0, >> + remove: values.remove, >> }; >> >> if (values.mailto) { >> > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1 2021-03-09 10:28 ` Fabian Ebner @ 2021-03-09 10:53 ` Fabian Ebner 0 siblings, 0 replies; 8+ messages in thread From: Fabian Ebner @ 2021-03-09 10:53 UTC (permalink / raw) To: pve-devel, Thomas Lamprecht On 09.03.21 11:28, Fabian Ebner wrote: > On 05.03.21 21:34, Thomas Lamprecht wrote: >> On 03.03.21 12:50, Fabian Ebner wrote: >>> A user with Datastore.AllocateSpace, VM.Audit, VM.Backup can already >>> remove >>> backups from the GUI manually, so it shouldn't be a problem if they >>> can set >>> the remove flag when starting a manual backup in the GUI. >>> >>> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> >>> --- >>> >>> Changes from v1: >>> * Rebase on current master. >>> * Do not use the label 'Remove', because that is rather >>> confusing, instead >>> use 'Prune'. >>> >>> www/manager6/window/Backup.js | 13 ++++++++++++- >>> 1 file changed, 12 insertions(+), 1 deletion(-) >>> >>> diff --git a/www/manager6/window/Backup.js >>> b/www/manager6/window/Backup.js >>> index 615073f3..d5b585bb 100644 >>> --- a/www/manager6/window/Backup.js >>> +++ b/www/manager6/window/Backup.js >>> @@ -68,6 +68,17 @@ Ext.define('PVE.window.Backup', { >>> name: 'mailto', >>> emptyText: Proxmox.Utils.noneText, >>> }, >>> + { >>> + xtype: 'proxmoxcheckbox', >>> + name: 'remove', >>> + checked: false, >>> + uncheckedValue: 0, >>> + fieldLabel: gettext('Prune'), >>> + autoEl: { >>> + tag: 'div', >>> + 'data-qtip': gettext('Prune older backups afterwards'), >>> + }, >>> + }, >> >> I find this confusing in the case the storage has no prune settings >> configured and >> also if there's one its intransparent as one cannot really tell which >> one. >> So I'd maybe only enable (or show?) this if it can actually do >> something, and in >> that case I'd also show the current settings (they could change in >> theory until >> the job is submitted, but not the norm and still better than nothing). >> >> > > I don't think there is an API call to GET the currently configured > vzdump properties yet. With that, we can set the other properties in the > manual backup window (mailto, compression, etc.) to their currently > configured values too. Also, if we pass along the previously retrieved > prune settings as an API param, there is no race. > But the prune-backups parameter is restricted to root (maxfiles is too), so passing it along doesn't work for other users. Would it make sense to change that? One can already manually remove backups with Datastore.AllocateSpace and VM.Backup, so being able to set a (potentially) different prune-backups param doesn't seem to make a big difference to me. (Note, I don't say the user should be able to edit the prune-backups param in the manual backup UI.) >>> ], >>> }); >>> @@ -82,7 +93,7 @@ Ext.define('PVE.window.Backup', { >>> storage: storage, >>> vmid: me.vmid, >>> mode: values.mode, >>> - remove: 0, >>> + remove: values.remove, >>> }; >>> if (values.mailto) { >>> >> > > > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [pve-devel] applied: [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter 2021-03-03 11:50 [pve-devel] [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter Fabian Ebner 2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 2/3] partially fix #2745: vzdump: use default for " Fabian Ebner 2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1 Fabian Ebner @ 2021-03-05 20:34 ` Thomas Lamprecht 2 siblings, 0 replies; 8+ messages in thread From: Thomas Lamprecht @ 2021-03-05 20:34 UTC (permalink / raw) To: Proxmox VE development discussion, Fabian Ebner On 03.03.21 12:50, Fabian Ebner wrote: > Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> > --- > > First version here (it's been a while): > https://lists.proxmox.com/pipermail/pve-devel/2020-October/045585.html > > Changes from v1: > * Space lines more evenly to get below 80 char limit. > > PVE/VZDump/Common.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > applied, thanks! ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-03-09 10:53 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-03 11:50 [pve-devel] [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter Fabian Ebner 2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 2/3] partially fix #2745: vzdump: use default for " Fabian Ebner 2021-03-05 20:34 ` [pve-devel] applied: " Thomas Lamprecht 2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1 Fabian Ebner 2021-03-05 20:34 ` Thomas Lamprecht 2021-03-09 10:28 ` Fabian Ebner 2021-03-09 10:53 ` Fabian Ebner 2021-03-05 20:34 ` [pve-devel] applied: [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter Thomas Lamprecht
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox