]> git.proxmox.com Git - pve-storage.git/commit - PVE/Storage/Plugin.pm
fix #3307: make it possible to set protection for backups
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 30 Sep 2021 11:42:08 +0000 (13:42 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 8 Nov 2021 13:56:15 +0000 (14:56 +0100)
commit56897a920350d4429485e27b2b165860c6c543cf
tree46a0a5820c95a20f50da2de7118f142186dfe577
parent9a4c0e84713d154539accad94c421a160c211e24
fix #3307: make it possible to set protection for backups

A protected backup is not removed by free_image and ignored when
pruning.

The protection_file_path function is introduced in Storage.pm, so that
it can also be used by vzdump itself and in archive_remove.

For pruning, renamed backups already behaved similiar to how protected
backups will, but there are a few reasons to not just use that for
implementing the new feature:
1. It wouldn't protect against removal.
2. It would make it necessary to rename notes and log files too.
3. It wouldn't naturally extend to other volumes if that's needed.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/API2/Storage/Content.pm
PVE/Storage.pm
PVE/Storage/DirPlugin.pm
PVE/Storage/Plugin.pm
test/prune_backups_test.pm