all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH-SERIES storage/guest-common/manager/docs 0/6] backup/storage: drop 'maxfiles' setting
@ 2025-07-18 12:51 Fiona Ebner
  2025-07-18 12:51 ` [pve-devel] [PATCH storage 1/6] config: drop 'maxfiles' parameter Fiona Ebner
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Fiona Ebner @ 2025-07-18 12:51 UTC (permalink / raw)
  To: pve-devel

The 'maxfiles' parameter has been deprecated since the addition of
'prune-backups' in the Proxmox VE 7 beta and is removed with Proxmox
VE 9 now.

For storages, it was auto-converted when reading the configuration.
For backups, editing would also auto-convert to the current
'prune-backups' setting and new jobs in jobs.cfg would always get
written with 'prune-backups'. The upgrade checker script already
contained checks warning about the deprecation, which are now changed
from warnings to proper errors.

The pve8to9 change should also be applied for stable-8.

storage:

Fiona Ebner (1):
  config: drop 'maxfiles' parameter

 src/PVE/Storage.pm                 | 23 -----------------------
 src/PVE/Storage/BTRFSPlugin.pm     |  1 -
 src/PVE/Storage/CIFSPlugin.pm      |  1 -
 src/PVE/Storage/CephFSPlugin.pm    |  1 -
 src/PVE/Storage/DirPlugin.pm       |  1 -
 src/PVE/Storage/NFSPlugin.pm       |  1 -
 src/PVE/Storage/PBSPlugin.pm       |  1 -
 src/PVE/Storage/Plugin.pm          |  7 -------
 src/test/list_volumes_test.pm      |  1 -
 src/test/path_to_volume_id_test.pm |  1 -
 10 files changed, 38 deletions(-)


guest-common:

Fiona Ebner (1):
  schema: backup: drop 'maxfiles' parameter

 src/PVE/VZDump/Common.pm | 8 --------
 1 file changed, 8 deletions(-)


manager:

Fiona Ebner (3):
  pve8to9: backup retention: increase severity of having 'maxfiles'
    setting configured
  backup: drop 'maxfiles' parameter
  ui: drop handling of removed 'maxfiles' setting

 PVE/API2/VZDump.pm                     |  14 +--
 PVE/CLI/pve8to9.pm                     |  14 +--
 PVE/VZDump.pm                          |  23 +----
 test/vzdump_new_test.pl                | 120 ++-----------------------
 www/manager6/controller/StorageEdit.js |  12 ---
 www/manager6/dc/Backup.js              |   7 --
 www/manager6/dc/BackupJobDetail.js     |   4 +-
 www/manager6/panel/BackupJobPrune.js   |   5 +-
 www/manager6/storage/Base.js           |   5 --
 9 files changed, 25 insertions(+), 179 deletions(-)


docs:

Fiona Ebner (1):
  backup/storage: remove references to 'maxfiles' parameter

 pvesm.adoc  | 5 -----
 vzdump.adoc | 4 ----
 2 files changed, 9 deletions(-)


Summary over all repositories:
  22 files changed, 25 insertions(+), 234 deletions(-)

-- 
Generated by git-murpp 0.5.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH storage 1/6] config: drop 'maxfiles' parameter
  2025-07-18 12:51 [pve-devel] [PATCH-SERIES storage/guest-common/manager/docs 0/6] backup/storage: drop 'maxfiles' setting Fiona Ebner
@ 2025-07-18 12:51 ` Fiona Ebner
  2025-07-30 17:36   ` [pve-devel] applied: " Thomas Lamprecht
  2025-07-18 12:51 ` [pve-devel] [PATCH guest-common 2/6] schema: backup: " Fiona Ebner
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Fiona Ebner @ 2025-07-18 12:51 UTC (permalink / raw)
  To: pve-devel

The 'maxfiles' parameter has been deprecated since the addition of
'prune-backups' in the Proxmox VE 7 beta.

The setting was auto-converted when reading the storage
configuration.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/Storage.pm                 | 23 -----------------------
 src/PVE/Storage/BTRFSPlugin.pm     |  1 -
 src/PVE/Storage/CIFSPlugin.pm      |  1 -
 src/PVE/Storage/CephFSPlugin.pm    |  1 -
 src/PVE/Storage/DirPlugin.pm       |  1 -
 src/PVE/Storage/NFSPlugin.pm       |  1 -
 src/PVE/Storage/PBSPlugin.pm       |  1 -
 src/PVE/Storage/Plugin.pm          |  7 -------
 src/test/list_volumes_test.pm      |  1 -
 src/test/path_to_volume_id_test.pm |  1 -
 10 files changed, 38 deletions(-)

diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
index 6ca9f88..947e604 100755
--- a/src/PVE/Storage.pm
+++ b/src/PVE/Storage.pm
@@ -249,27 +249,6 @@ sub lock_storage_config {
     }
 }
 
-# FIXME remove maxfiles for PVE 8.0 or PVE 9.0
-my $convert_maxfiles_to_prune_backups = sub {
-    my ($scfg) = @_;
-
-    return if !$scfg;
-
-    my $maxfiles = delete $scfg->{maxfiles};
-
-    if (!defined($scfg->{'prune-backups'}) && defined($maxfiles)) {
-        my $prune_backups;
-        if ($maxfiles) {
-            $prune_backups = { 'keep-last' => $maxfiles };
-        } else { # maxfiles 0 means no limit
-            $prune_backups = { 'keep-all' => 1 };
-        }
-        $scfg->{'prune-backups'} = PVE::JSONSchema::print_property_string(
-            $prune_backups, 'prune-backups',
-        );
-    }
-};
-
 sub storage_config {
     my ($cfg, $storeid, $noerr) = @_;
 
@@ -279,8 +258,6 @@ sub storage_config {
 
     die "storage '$storeid' does not exist\n" if (!$noerr && !$scfg);
 
-    $convert_maxfiles_to_prune_backups->($scfg);
-
     return $scfg;
 }
 
diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 26eef2b..7d6ed62 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -68,7 +68,6 @@ sub options {
         nodes => { optional => 1 },
         shared => { optional => 1 },
         disable => { optional => 1 },
-        maxfiles => { optional => 1 },
         'prune-backups' => { optional => 1 },
         'max-protected-backups' => { optional => 1 },
         content => { optional => 1 },
diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm
index 75d89c1..35a1a3b 100644
--- a/src/PVE/Storage/CIFSPlugin.pm
+++ b/src/PVE/Storage/CIFSPlugin.pm
@@ -153,7 +153,6 @@ sub options {
         subdir => { optional => 1 },
         nodes => { optional => 1 },
         disable => { optional => 1 },
-        maxfiles => { optional => 1 },
         'prune-backups' => { optional => 1 },
         'max-protected-backups' => { optional => 1 },
         content => { optional => 1 },
diff --git a/src/PVE/Storage/CephFSPlugin.pm b/src/PVE/Storage/CephFSPlugin.pm
index 67c79aa..fbc9711 100644
--- a/src/PVE/Storage/CephFSPlugin.pm
+++ b/src/PVE/Storage/CephFSPlugin.pm
@@ -153,7 +153,6 @@ sub options {
         'create-subdirs' => { optional => 1 },
         fuse => { optional => 1 },
         bwlimit => { optional => 1 },
-        maxfiles => { optional => 1 },
         keyring => { optional => 1 },
         'prune-backups' => { optional => 1 },
         'max-protected-backups' => { optional => 1 },
diff --git a/src/PVE/Storage/DirPlugin.pm b/src/PVE/Storage/DirPlugin.pm
index 9d15f33..80c4a03 100644
--- a/src/PVE/Storage/DirPlugin.pm
+++ b/src/PVE/Storage/DirPlugin.pm
@@ -84,7 +84,6 @@ sub options {
         nodes => { optional => 1 },
         shared => { optional => 1 },
         disable => { optional => 1 },
-        maxfiles => { optional => 1 },
         'prune-backups' => { optional => 1 },
         'max-protected-backups' => { optional => 1 },
         content => { optional => 1 },
diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm
index a8339ef..b416703 100644
--- a/src/PVE/Storage/NFSPlugin.pm
+++ b/src/PVE/Storage/NFSPlugin.pm
@@ -93,7 +93,6 @@ sub options {
         export => { fixed => 1 },
         nodes => { optional => 1 },
         disable => { optional => 1 },
-        maxfiles => { optional => 1 },
         'prune-backups' => { optional => 1 },
         'max-protected-backups' => { optional => 1 },
         options => { optional => 1 },
diff --git a/src/PVE/Storage/PBSPlugin.pm b/src/PVE/Storage/PBSPlugin.pm
index 00170f5..22e7a8b 100644
--- a/src/PVE/Storage/PBSPlugin.pm
+++ b/src/PVE/Storage/PBSPlugin.pm
@@ -72,7 +72,6 @@ sub options {
         password => { optional => 1 },
         'encryption-key' => { optional => 1 },
         'master-pubkey' => { optional => 1 },
-        maxfiles => { optional => 1 },
         'prune-backups' => { optional => 1 },
         'max-protected-backups' => { optional => 1 },
         fingerprint => { optional => 1 },
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index ef04cb1..1b272cf 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -159,13 +159,6 @@ my $defaultData = {
             type => 'boolean',
             optional => 1,
         },
-        maxfiles => {
-            description => "Deprecated: use 'prune-backups' instead. "
-                . "Maximal number of backup files per VM. Use '0' for unlimited.",
-            type => 'integer',
-            minimum => 0,
-            optional => 1,
-        },
         'prune-backups' => get_standard_option('prune-backups'),
         'max-protected-backups' => {
             description =>
diff --git a/src/test/list_volumes_test.pm b/src/test/list_volumes_test.pm
index e528fc3..0876902 100644
--- a/src/test/list_volumes_test.pm
+++ b/src/test/list_volumes_test.pm
@@ -63,7 +63,6 @@ my $mocked_vmlist = {
 my $storage_dir = File::Temp->newdir();
 my $scfg = {
     'type' => 'dir',
-    'maxfiles' => 0,
     'path' => $storage_dir,
     'shared' => 0,
     'content' => {
diff --git a/src/test/path_to_volume_id_test.pm b/src/test/path_to_volume_id_test.pm
index 9a5ecbb..e69b085 100644
--- a/src/test/path_to_volume_id_test.pm
+++ b/src/test/path_to_volume_id_test.pm
@@ -22,7 +22,6 @@ my $scfg = {
             'shared' => 0,
             'path' => "$storage_dir",
             'type' => 'dir',
-            'maxfiles' => 0,
             'content' => {
                 'snippets' => 1,
                 'rootdir' => 1,
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH guest-common 2/6] schema: backup: drop 'maxfiles' parameter
  2025-07-18 12:51 [pve-devel] [PATCH-SERIES storage/guest-common/manager/docs 0/6] backup/storage: drop 'maxfiles' setting Fiona Ebner
  2025-07-18 12:51 ` [pve-devel] [PATCH storage 1/6] config: drop 'maxfiles' parameter Fiona Ebner
@ 2025-07-18 12:51 ` Fiona Ebner
  2025-07-18 12:51 ` [pve-devel] [PATCH manager 3/6] pve8to9: backup retention: increase severity of having 'maxfiles' setting configured Fiona Ebner
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Fiona Ebner @ 2025-07-18 12:51 UTC (permalink / raw)
  To: pve-devel

The 'maxfiles' parameter has been deprecated since the addition of
'prune-backups' in the Proxmox VE 7 beta.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/VZDump/Common.pm | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/PVE/VZDump/Common.pm b/src/PVE/VZDump/Common.pm
index 902829f..67a4cf4 100644
--- a/src/PVE/VZDump/Common.pm
+++ b/src/PVE/VZDump/Common.pm
@@ -339,14 +339,6 @@ my $confdesc = {
         minimum => 0,
         default => 10, # 10 minutes
     },
-    # FIXME remove with PVE 8.0 or PVE 9.0
-    maxfiles => {
-        type => 'integer',
-        description => "Deprecated: use 'prune-backups' instead. "
-            . "Maximal number of backup files per guest system.",
-        optional => 1,
-        minimum => 1,
-    },
     'prune-backups' => get_standard_option(
         'prune-backups',
         {
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH manager 3/6] pve8to9: backup retention: increase severity of having 'maxfiles' setting configured
  2025-07-18 12:51 [pve-devel] [PATCH-SERIES storage/guest-common/manager/docs 0/6] backup/storage: drop 'maxfiles' setting Fiona Ebner
  2025-07-18 12:51 ` [pve-devel] [PATCH storage 1/6] config: drop 'maxfiles' parameter Fiona Ebner
  2025-07-18 12:51 ` [pve-devel] [PATCH guest-common 2/6] schema: backup: " Fiona Ebner
@ 2025-07-18 12:51 ` Fiona Ebner
  2025-07-29 15:54   ` [pve-devel] applied: " Thomas Lamprecht
  2025-07-18 12:51 ` [pve-devel] [PATCH manager 4/6] backup: drop 'maxfiles' parameter Fiona Ebner
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Fiona Ebner @ 2025-07-18 12:51 UTC (permalink / raw)
  To: pve-devel

The 'maxfiles' setting is dropped with Proxmox VE 9, so make having
the setting configured a proper error rather than just a warning.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

NOTE: for both stable-8 and master

 PVE/CLI/pve8to9.pm | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm
index cd8ea038..d0f8cff0 100644
--- a/PVE/CLI/pve8to9.pm
+++ b/PVE/CLI/pve8to9.pm
@@ -649,8 +649,8 @@ sub check_backup_retention_settings {
 
     my $pass = 1;
 
-    my $maxfiles_msg = "parameter 'maxfiles' is deprecated with PVE 7.x and will be removed in a "
-        . "future version, use 'prune-backups' instead.";
+    my $maxfiles_msg = "parameter 'maxfiles' was deprecated with PVE 7.x and is getting dropped"
+        . " with PVE 9.";
 
     eval {
         my $confdesc = PVE::VZDump::Common::get_confdesc();
@@ -665,12 +665,12 @@ sub check_backup_retention_settings {
 
         if (defined($param->{maxfiles})) {
             $pass = 0;
-            log_warn("$fn - $maxfiles_msg");
+            log_fail("$fn - $maxfiles_msg");
         }
     };
     if (my $err = $@) {
         $pass = 0;
-        log_warn("unable to parse node's VZDump configuration - $err");
+        log_fail("unable to parse node's VZDump configuration - $err");
     }
 
     my $storage_cfg = PVE::Storage::config();
@@ -680,7 +680,7 @@ sub check_backup_retention_settings {
 
         if (defined($scfg->{maxfiles})) {
             $pass = 0;
-            log_warn("storage '$storeid' - $maxfiles_msg");
+            log_fail("storage '$storeid' - $maxfiles_msg");
         }
     }
 
@@ -690,12 +690,12 @@ sub check_backup_retention_settings {
         # only warn once, there might be many jobs...
         if (scalar(grep { defined($_->{maxfiles}) } $vzdump_cron->{jobs}->@*)) {
             $pass = 0;
-            log_warn("/etc/pve/vzdump.cron - $maxfiles_msg");
+            log_fail("/etc/pve/vzdump.cron - $maxfiles_msg");
         }
     };
     if (my $err = $@) {
         $pass = 0;
-        log_warn("unable to parse node's VZDump configuration - $err");
+        log_fail("unable to parse node's VZDump configuration - $err");
     }
 
     log_pass("no backup retention problems found.") if $pass;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH manager 4/6] backup: drop 'maxfiles' parameter
  2025-07-18 12:51 [pve-devel] [PATCH-SERIES storage/guest-common/manager/docs 0/6] backup/storage: drop 'maxfiles' setting Fiona Ebner
                   ` (2 preceding siblings ...)
  2025-07-18 12:51 ` [pve-devel] [PATCH manager 3/6] pve8to9: backup retention: increase severity of having 'maxfiles' setting configured Fiona Ebner
@ 2025-07-18 12:51 ` Fiona Ebner
  2025-07-30 23:21   ` [pve-devel] applied: " Thomas Lamprecht
  2025-07-18 12:51 ` [pve-devel] [PATCH manager 5/6] ui: drop handling of removed 'maxfiles' setting Fiona Ebner
  2025-07-18 12:51 ` [pve-devel] [PATCH docs 6/6] backup/storage: remove references to 'maxfiles' parameter Fiona Ebner
  5 siblings, 1 reply; 12+ messages in thread
From: Fiona Ebner @ 2025-07-18 12:51 UTC (permalink / raw)
  To: pve-devel

The 'maxfiles' parameter has been deprecated since the addition of
'prune-backups' in the Proxmox VE 7 beta.

Drop the tests that only had maxfiles or both, but adapt the mixed
tests for CLI/backup/storage precedence.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 PVE/API2/VZDump.pm      |  14 ++---
 PVE/VZDump.pm           |  23 ++------
 test/vzdump_new_test.pl | 120 ++--------------------------------------
 3 files changed, 16 insertions(+), 141 deletions(-)

diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm
index de48e108..a8f21eba 100644
--- a/PVE/API2/VZDump.pm
+++ b/PVE/API2/VZDump.pm
@@ -27,7 +27,7 @@ my sub assert_param_permission_vzdump {
 
     PVE::API2::Backup::assert_param_permission_common($rpcenv, $user, $param);
 
-    if (defined($param->{maxfiles}) || defined($param->{'prune-backups'})) {
+    if (defined($param->{'prune-backups'})) {
         if (my $storeid = PVE::VZDump::get_storage_param($param)) {
             $rpcenv->check($user, "/storage/$storeid", ['Datastore.Allocate']);
         }
@@ -40,12 +40,12 @@ __PACKAGE__->register_method({
     method => 'POST',
     description => "Create backup.",
     permissions => {
-        description => "The user needs 'VM.Backup' permissions on any VM, and "
-            . "'Datastore.AllocateSpace' on the backup storage (and fleecing storage when fleecing "
-            . "is used). The 'tmpdir', 'dumpdir', 'script' and 'job-id' parameters are restricted "
-            . "to the 'root\@pam' user. The 'maxfiles' and 'prune-backups' settings require "
-            . "'Datastore.Allocate' on the backup storage. The 'bwlimit', 'performance' and "
-            . "'ionice' parameters require 'Sys.Modify' on '/'.",
+        description => "The user needs 'VM.Backup' permissions on any VM, and"
+            . " 'Datastore.AllocateSpace' on the backup storage (and fleecing storage when fleecing"
+            . " is used). The 'tmpdir', 'dumpdir', 'script' and 'job-id' parameters are restricted"
+            . " to the 'root\@pam' user. The 'prune-backups' setting requires 'Datastore.Allocate'"
+            . " on the backup storage. The 'bwlimit', 'performance' and 'ionice' parameters require"
+            . " 'Sys.Modify' on '/'.",
         user => 'all',
     },
     protected => 1,
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index cf71a9fa..defe9e0a 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -177,28 +177,16 @@ my sub merge_performance {
     return $res;
 }
 
-my $parse_prune_backups_maxfiles = sub {
+my $parse_prune_backups = sub {
     my ($param, $kind) = @_;
 
-    my $maxfiles = delete $param->{maxfiles};
     my $prune_backups = $param->{'prune-backups'};
 
-    debugmsg(
-        'warn',
-        "both 'maxfiles' and 'prune-backups' defined as ${kind} - ignoring 'maxfiles'",
-    ) if defined($maxfiles) && defined($prune_backups);
-
     if (defined($prune_backups)) {
         return $prune_backups if ref($prune_backups) eq 'HASH'; # already parsed
         $param->{'prune-backups'} = PVE::JSONSchema::parse_property_string(
             'prune-backups', $prune_backups,
         );
-    } elsif (defined($maxfiles)) {
-        if ($maxfiles) {
-            $param->{'prune-backups'} = { 'keep-last' => $maxfiles };
-        } else {
-            $param->{'prune-backups'} = { 'keep-all' => 1 };
-        }
     }
 
     return $param->{'prune-backups'};
@@ -335,7 +323,7 @@ sub read_vzdump_defaults {
             defined($default) ? ($_ => $default) : ()
         } keys $fleecing_fmt->%*
     };
-    $parse_prune_backups_maxfiles->($defaults, "defaults in VZDump schema");
+    $parse_prune_backups->($defaults, "defaults in VZDump schema");
 
     my $raw;
     eval { $raw = PVE::Tools::file_get_contents($fn); };
@@ -360,7 +348,7 @@ sub read_vzdump_defaults {
         my @mailto = split_list($res->{mailto});
         $res->{mailto} = [@mailto];
     }
-    $parse_prune_backups_maxfiles->($res, "options in '$fn'");
+    $parse_prune_backups->($res, "options in '$fn'");
     parse_fleecing($res);
     parse_performance($res);
 
@@ -1548,10 +1536,7 @@ sub verify_vzdump_parameters {
     raise_param_exc({ pool => "option conflicts with option 'vmid'" })
         if $param->{pool} && $param->{vmid};
 
-    raise_param_exc({ 'prune-backups' => "option conflicts with option 'maxfiles'" })
-        if defined($param->{'prune-backups'}) && defined($param->{maxfiles});
-
-    $parse_prune_backups_maxfiles->($param, 'CLI parameters');
+    $parse_prune_backups->($param, 'CLI parameters');
     parse_fleecing($param);
     parse_performance($param);
 
diff --git a/test/vzdump_new_test.pl b/test/vzdump_new_test.pl
index 36225ebb..db829e70 100755
--- a/test/vzdump_new_test.pl
+++ b/test/vzdump_new_test.pl
@@ -105,78 +105,6 @@ my @tests = (
         },
     },
     # TODO make parse error critical?
-    {
-        description => 'maxfiles vzdump 1',
-        vzdump_param => {
-            maxfiles => 0,
-        },
-        expected => {
-            'prune-backups' => {
-                'keep-all' => 1,
-            },
-            remove => 0,
-        },
-    },
-    {
-        description => 'maxfiles vzdump 2',
-        vzdump_param => {
-            maxfiles => 7,
-        },
-        expected => {
-            'prune-backups' => {
-                'keep-last' => 7,
-            },
-            remove => 1,
-        },
-    },
-    {
-        description => 'maxfiles storage 1',
-        storage_param => {
-            maxfiles => 0,
-        },
-        expected => {
-            'prune-backups' => {
-                'keep-all' => 1,
-            },
-            remove => 0,
-        },
-    },
-    {
-        description => 'maxfiles storage 2',
-        storage_param => {
-            maxfiles => 7,
-        },
-        expected => {
-            'prune-backups' => {
-                'keep-last' => 7,
-            },
-            remove => 1,
-        },
-    },
-    {
-        description => 'maxfiles CLI 1',
-        cli_param => {
-            maxfiles => 0,
-        },
-        expected => {
-            'prune-backups' => {
-                'keep-all' => 1,
-            },
-            remove => 0,
-        },
-    },
-    {
-        description => 'maxfiles CLI 2',
-        cli_param => {
-            maxfiles => 7,
-        },
-        expected => {
-            'prune-backups' => {
-                'keep-last' => 7,
-            },
-            remove => 1,
-        },
-    },
     {
         description => 'prune-backups vzdump 1',
         vzdump_param => {
@@ -219,19 +147,6 @@ my @tests = (
             remove => 0,
         },
     },
-    {
-        description => 'both vzdump 1',
-        vzdump_param => {
-            'prune-backups' => 'keep-all=1',
-            maxfiles => 7,
-        },
-        expected => {
-            'prune-backups' => {
-                'keep-all' => 1,
-            },
-            remove => 0,
-        },
-    },
     {
         description => 'prune-backups storage 1',
         storage_param => {
@@ -275,21 +190,6 @@ my @tests = (
             remove => 0,
         },
     },
-    {
-        description => 'both storage 1',
-        storage_param => {
-            'prune-backups' => 'keep-hourly=1,keep-monthly=2,keep-yearly=3',
-            maxfiles => 0,
-        },
-        expected => {
-            'prune-backups' => {
-                'keep-hourly' => 1,
-                'keep-monthly' => 2,
-                'keep-yearly' => 3,
-            },
-            remove => 1,
-        },
-    },
     {
         description => 'prune-backups CLI 1',
         cli_param => {
@@ -329,19 +229,10 @@ my @tests = (
         expected => "format error\n"
             . "foo: property is not defined in schema and the schema does not allow additional properties\n",
     },
-    {
-        description => 'both CLI 1',
-        cli_param => {
-            'prune-backups' => 'keep-hourly=1,keep-monthly=2,keep-yearly=3',
-            maxfiles => 4,
-        },
-        expected => "400 Parameter verification failed.\n"
-            . "prune-backups: option conflicts with option 'maxfiles'\n",
-    },
     {
         description => 'mixed 1',
         vzdump_param => {
-            maxfiles => 7,
+            'prune-backups' => 'keep-last=7',
         },
         storage_param => {
             'prune-backups' => 'keep-hourly=24',
@@ -357,7 +248,7 @@ my @tests = (
     {
         description => 'mixed 2',
         vzdump_param => {
-            maxfiles => 7,
+            'prune-backups' => 'keep-last=7',
         },
         storage_param => {
             'prune-backups' => 'keephourly=24',
@@ -372,7 +263,7 @@ my @tests = (
     {
         description => 'mixed 3',
         vzdump_param => {
-            maxfiles => 7,
+            'prune-backups' => 'keep-last=7',
         },
         cli_param => {
             'prune-backups' => 'keep-all=1',
@@ -387,7 +278,7 @@ my @tests = (
     {
         description => 'mixed 4',
         vzdump_param => {
-            maxfiles => 7,
+            'prune-backups' => 'keep-last=7',
         },
         storage_param => {
             'prune-backups' => 'keep-all=0,keep-last=10',
@@ -405,7 +296,7 @@ my @tests = (
     {
         description => 'mixed 5',
         vzdump_param => {
-            maxfiles => 7,
+            'prune-backups' => 'keep-last=7',
         },
         storage_param => {
             'prune-backups' => 'keep-all=0,keep-last=10',
@@ -650,7 +541,6 @@ foreach my $test (@tests) {
         my $vzdump = PVE::VZDump->new('fake cmdline', $test->{cli_param}, undef);
 
         my $opts = $vzdump->{opts} or die "did not get options\n";
-        die "maxfiles is defined" if defined($opts->{maxfiles});
 
         my $res = {};
         foreach my $opt (@{$tested_options}) {
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH manager 5/6] ui: drop handling of removed 'maxfiles' setting
  2025-07-18 12:51 [pve-devel] [PATCH-SERIES storage/guest-common/manager/docs 0/6] backup/storage: drop 'maxfiles' setting Fiona Ebner
                   ` (3 preceding siblings ...)
  2025-07-18 12:51 ` [pve-devel] [PATCH manager 4/6] backup: drop 'maxfiles' parameter Fiona Ebner
@ 2025-07-18 12:51 ` Fiona Ebner
  2025-07-30 23:21   ` [pve-devel] applied: " Thomas Lamprecht
  2025-07-18 12:51 ` [pve-devel] [PATCH docs 6/6] backup/storage: remove references to 'maxfiles' parameter Fiona Ebner
  5 siblings, 1 reply; 12+ messages in thread
From: Fiona Ebner @ 2025-07-18 12:51 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 www/manager6/controller/StorageEdit.js | 12 ------------
 www/manager6/dc/Backup.js              |  7 -------
 www/manager6/dc/BackupJobDetail.js     |  4 +---
 www/manager6/panel/BackupJobPrune.js   |  5 +----
 www/manager6/storage/Base.js           |  5 -----
 5 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/www/manager6/controller/StorageEdit.js b/www/manager6/controller/StorageEdit.js
index 384f9ab4..1acadbe3 100644
--- a/www/manager6/controller/StorageEdit.js
+++ b/www/manager6/controller/StorageEdit.js
@@ -9,18 +9,6 @@ Ext.define('PVE.controller.StorageEdit', {
                 if (prealloc) {
                     prealloc.setDisabled(!hasImages);
                 }
-
-                var hasBackups = Ext.Array.contains(value, 'backup');
-                var maxfiles = this.lookupReference('maxfiles');
-                if (!maxfiles) {
-                    return;
-                }
-
-                if (!hasBackups) {
-                    // clear values which will never be submitted
-                    maxfiles.reset();
-                }
-                maxfiles.setDisabled(!hasBackups);
             },
         },
     },
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index 0ad49568..dff588b2 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -167,13 +167,6 @@ Ext.define('PVE.dc.BackupEdit', {
             if (data['prune-backups']) {
                 Object.assign(data, data['prune-backups']);
                 delete data['prune-backups'];
-            } else if (data.maxfiles !== undefined) {
-                if (data.maxfiles > 0) {
-                    data['keep-last'] = data.maxfiles;
-                } else {
-                    data['keep-all'] = 1;
-                }
-                delete data.maxfiles;
             }
 
             if (data['notes-template']) {
diff --git a/www/manager6/dc/BackupJobDetail.js b/www/manager6/dc/BackupJobDetail.js
index 67ec5273..86a593b3 100644
--- a/www/manager6/dc/BackupJobDetail.js
+++ b/www/manager6/dc/BackupJobDetail.js
@@ -371,12 +371,10 @@ Ext.define('PVE.dc.BackupInfo', {
             }
         });
 
-        if (values['prune-backups'] || values.maxfiles !== undefined) {
+        if (values['prune-backups']) {
             let keepValues;
             if (values['prune-backups']) {
                 keepValues = values['prune-backups'];
-            } else if (values.maxfiles > 0) {
-                keepValues = { 'keep-last': values.maxfiles };
             } else {
                 keepValues = { 'keep-all': 1 };
             }
diff --git a/www/manager6/panel/BackupJobPrune.js b/www/manager6/panel/BackupJobPrune.js
index 960142b5..cf34ea83 100644
--- a/www/manager6/panel/BackupJobPrune.js
+++ b/www/manager6/panel/BackupJobPrune.js
@@ -35,10 +35,7 @@ Ext.define('PVE.panel.BackupJobPrune', {
             options['prune-backups'] = retention;
         }
 
-        if (!this.isCreate) {
-            // always delete old 'maxfiles' on edit, we map it to keep-last on window load
-            options.delete.push('maxfiles');
-        } else {
+        if (this.isCreate) {
             delete options.delete;
         }
 
diff --git a/www/manager6/storage/Base.js b/www/manager6/storage/Base.js
index d945cf79..a3177faa 100644
--- a/www/manager6/storage/Base.js
+++ b/www/manager6/storage/Base.js
@@ -186,11 +186,6 @@ Ext.define('PVE.storage.BaseEdit', {
                         let retention = PVE.Parser.parsePropertyString(values['prune-backups']);
                         delete values['prune-backups'];
                         Object.assign(values, retention);
-                    } else if (values.maxfiles !== undefined) {
-                        if (values.maxfiles > 0) {
-                            values['keep-last'] = values.maxfiles;
-                        }
-                        delete values.maxfiles;
                     }
 
                     me.query('inputpanel').forEach((panel) => {
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH docs 6/6] backup/storage: remove references to 'maxfiles' parameter
  2025-07-18 12:51 [pve-devel] [PATCH-SERIES storage/guest-common/manager/docs 0/6] backup/storage: drop 'maxfiles' setting Fiona Ebner
                   ` (4 preceding siblings ...)
  2025-07-18 12:51 ` [pve-devel] [PATCH manager 5/6] ui: drop handling of removed 'maxfiles' setting Fiona Ebner
@ 2025-07-18 12:51 ` Fiona Ebner
  2025-07-30 23:47   ` [pve-devel] applied: " Thomas Lamprecht
  5 siblings, 1 reply; 12+ messages in thread
From: Fiona Ebner @ 2025-07-18 12:51 UTC (permalink / raw)
  To: pve-devel

The deprecated 'maxfiles' setting is being removed with Proxmox VE 9
now.

There are some generated docs where 'make update' is necessary to
phase it out.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 pvesm.adoc  | 5 -----
 vzdump.adoc | 4 ----
 2 files changed, 9 deletions(-)

diff --git a/pvesm.adoc b/pvesm.adoc
index 7e43910..e075fe0 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -241,11 +241,6 @@ disable::
 
 You can use this flag to disable the storage completely.
 
-maxfiles::
-
-Deprecated, please use `prune-backups` instead. Maximum number of backup files
-per VM. Use `0` for unlimited.
-
 prune-backups::
 
 Retention options for backups. For details, see
diff --git a/vzdump.adoc b/vzdump.adoc
index a404881..8458210 100644
--- a/vzdump.adoc
+++ b/vzdump.adoc
@@ -361,10 +361,6 @@ While you can pass `prune-backups` directly to `vzdump`, it is often more
 sensible to configure the setting on the storage level, which can be done via
 the web interface.
 
-NOTE: The old `maxfiles` option is deprecated and should be replaced either by
-`keep-last` or, in case `maxfiles` was `0` for unlimited retention, by
-`keep-all`.
-
 
 Prune Simulator
 ~~~~~~~~~~~~~~~
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] applied: [PATCH manager 3/6] pve8to9: backup retention: increase severity of having 'maxfiles' setting configured
  2025-07-18 12:51 ` [pve-devel] [PATCH manager 3/6] pve8to9: backup retention: increase severity of having 'maxfiles' setting configured Fiona Ebner
@ 2025-07-29 15:54   ` Thomas Lamprecht
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Lamprecht @ 2025-07-29 15:54 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Fri, 18 Jul 2025 14:51:14 +0200, Fiona Ebner wrote:
> The 'maxfiles' setting is dropped with Proxmox VE 9, so make having
> the setting configured a proper error rather than just a warning.
> 
> 

Applied to stable-8 branch, thanks!

This does not really hurt to have even if we do not follow through with the
removal in PVE 9 in any case, especially as warning is already a pretty "scary"
severity anyway, so I'd think that most user should have update their
definitions already.

FWIW, it could be nice to have a migration script though, mapping any left-over
maxfiles entry to keep-last, but OTOH, it's basically a sed, so if more users
surface that are unsure about what to do, we can provide them with a `sed`
example, at least as stop-gap.

[3/6] pve8to9: backup retention: increase severity of having 'maxfiles' setting configured
      commit: e44a90c25b0ada3d4ab49a7d5d71e8f6357a4240


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] applied: [PATCH storage 1/6] config: drop 'maxfiles' parameter
  2025-07-18 12:51 ` [pve-devel] [PATCH storage 1/6] config: drop 'maxfiles' parameter Fiona Ebner
@ 2025-07-30 17:36   ` Thomas Lamprecht
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Lamprecht @ 2025-07-30 17:36 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Fri, 18 Jul 2025 14:51:12 +0200, Fiona Ebner wrote:
> The 'maxfiles' parameter has been deprecated since the addition of
> 'prune-backups' in the Proxmox VE 7 beta.
> 
> The setting was auto-converted when reading the storage
> configuration.
> 
> 
> [...]

Applied, thanks!

[1/6] config: drop 'maxfiles' parameter
      commit: e502404fa2174b00b801fa408d1242a9541af02c


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] applied: [PATCH manager 4/6] backup: drop 'maxfiles' parameter
  2025-07-18 12:51 ` [pve-devel] [PATCH manager 4/6] backup: drop 'maxfiles' parameter Fiona Ebner
@ 2025-07-30 23:21   ` Thomas Lamprecht
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Lamprecht @ 2025-07-30 23:21 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Fri, 18 Jul 2025 14:51:15 +0200, Fiona Ebner wrote:
> The 'maxfiles' parameter has been deprecated since the addition of
> 'prune-backups' in the Proxmox VE 7 beta.
> 
> Drop the tests that only had maxfiles or both, but adapt the mixed
> tests for CLI/backup/storage precedence.
> 
> 
> [...]

Applied, thanks!

[4/6] backup: drop 'maxfiles' parameter
      commit: 9b193c4aac2b4e38945297e84f2f266c43cc12f9


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] applied: [PATCH manager 5/6] ui: drop handling of removed 'maxfiles' setting
  2025-07-18 12:51 ` [pve-devel] [PATCH manager 5/6] ui: drop handling of removed 'maxfiles' setting Fiona Ebner
@ 2025-07-30 23:21   ` Thomas Lamprecht
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Lamprecht @ 2025-07-30 23:21 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Fri, 18 Jul 2025 14:51:16 +0200, Fiona Ebner wrote:
> 


Applied, thanks!

[5/6] ui: drop handling of removed 'maxfiles' setting
      commit: 7f4c298e1587f71e52ca5bdc91bcf2ff41d3a3c2


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] applied: [PATCH docs 6/6] backup/storage: remove references to 'maxfiles' parameter
  2025-07-18 12:51 ` [pve-devel] [PATCH docs 6/6] backup/storage: remove references to 'maxfiles' parameter Fiona Ebner
@ 2025-07-30 23:47   ` Thomas Lamprecht
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Lamprecht @ 2025-07-30 23:47 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Fri, 18 Jul 2025 14:51:17 +0200, Fiona Ebner wrote:
> The deprecated 'maxfiles' setting is being removed with Proxmox VE 9
> now.
> 
> There are some generated docs where 'make update' is necessary to
> phase it out.
> 
> 
> [...]

Applied, thanks!

[6/6] backup/storage: remove references to 'maxfiles' parameter
      commit: f7540b8ad921a298efb90d058903050e3207a78e


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-07-30 23:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-18 12:51 [pve-devel] [PATCH-SERIES storage/guest-common/manager/docs 0/6] backup/storage: drop 'maxfiles' setting Fiona Ebner
2025-07-18 12:51 ` [pve-devel] [PATCH storage 1/6] config: drop 'maxfiles' parameter Fiona Ebner
2025-07-30 17:36   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-18 12:51 ` [pve-devel] [PATCH guest-common 2/6] schema: backup: " Fiona Ebner
2025-07-18 12:51 ` [pve-devel] [PATCH manager 3/6] pve8to9: backup retention: increase severity of having 'maxfiles' setting configured Fiona Ebner
2025-07-29 15:54   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-18 12:51 ` [pve-devel] [PATCH manager 4/6] backup: drop 'maxfiles' parameter Fiona Ebner
2025-07-30 23:21   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-18 12:51 ` [pve-devel] [PATCH manager 5/6] ui: drop handling of removed 'maxfiles' setting Fiona Ebner
2025-07-30 23:21   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-18 12:51 ` [pve-devel] [PATCH docs 6/6] backup/storage: remove references to 'maxfiles' parameter Fiona Ebner
2025-07-30 23:47   ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal