[pve-devel] [PATCH/RFC guest-common 2/2] vzdump: defaults: keep all backups by default for 7.0

Fabian Ebner f.ebner at proxmox.com
Fri Jun 4 15:49:26 CEST 2021


and switch to using prune-backups instead of maxfiles.

Storages created via the web UI defaulted to keeping all backups already, switch
to this safer default here as well.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

Breaks build in pve-manager, because the tests there need to be adapted,
see patch #3 for manager.

 src/PVE/VZDump/Common.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/PVE/VZDump/Common.pm b/src/PVE/VZDump/Common.pm
index f325850..83d7413 100644
--- a/src/PVE/VZDump/Common.pm
+++ b/src/PVE/VZDump/Common.pm
@@ -210,21 +210,22 @@ my $confdesc = {
 	minimum => 0,
 	default => 10, # 10 minutes
     },
+    # FIXME remove with PVE 8.0 or PVE 9.0
     maxfiles => {
 	type => 'integer',
-	description => "Maximal number of backup files per guest system.",
+	description => "Deprecated: use 'prune-backups' instead. " .
+	    "Maximal number of backup files per guest system.",
 	optional => 1,
 	minimum => 1,
-	default => 1,
     },
     'prune-backups' => get_standard_option('prune-backups', {
 	description => "Use these retention options instead of those from the storage configuration.",
 	optional => 1,
+	default => "keep-all=1",
     }),
     remove => {
 	type => 'boolean',
-	description => "Remove old backup files if there are more than " .
-	    "'maxfiles' backup files or prune according to 'prune-backups'.",
+	description => "Prune older backups according to 'prune-backups'.",
 	optional => 1,
 	default => 1,
     },
-- 
2.30.2






More information about the pve-devel mailing list