]> git.proxmox.com Git - pve-manager-legacy.git/commit
Allow prune-backups as an alternative to maxfiles
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 29 Sep 2020 08:37:04 +0000 (10:37 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 30 Sep 2020 08:56:30 +0000 (10:56 +0200)
commit7ab7d6f15f11c107ac804f67c07f442e12dbf7e1
treeaa37e8c76ac9f9dfb606f3c310ceb75d3c50c5b3
parent36c11c1de7c6b07ed6b8370b0d62c9f61c967b8e
Allow prune-backups as an alternative to maxfiles

and make the two options mutally exclusive as long
as they are specified on the same level (e.g. both
from the storage configuration). Otherwise prefer
option > storage config > default (only maxfiles has a default currently).

Defines the backup limit for prune-backups as the sum of all
keep-values.

There is no perfect way to determine whether a
new backup would trigger a removal with prune later:
1. we would need a way to include the not yet existing backup
   in a 'prune --dry-run' check.
2. even if we had that check, if it's executed right before
   a full hour, and the actual backup happens after the full
   hour, the information from the check is not correct.

So in some cases, we allow backup jobs with remove=0, that
will lead to a removal when the next prune is executed.
Still, the job with remove=0 does not execute a prune, so:
1. There is a well-defined limit.
2. A job with remove=0 never removes an old backup.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/API2/VZDump.pm
PVE/VZDump.pm