]> git.proxmox.com Git - pve-storage.git/commitdiff
prune mark: preserve additional information for the keep-all case
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 30 Sep 2021 11:42:07 +0000 (13:42 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 8 Nov 2021 13:56:15 +0000 (14:56 +0100)
Currently, if an entry is already marked as 'protected'.

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

index 6d0aa25818601cd971b5589cd47be676deccc54f..223fbb5b4e94cfc6fe3823507dd234c116012095 100755 (executable)
@@ -1663,6 +1663,8 @@ sub prune_mark_backup_group {
 
     if ($keep->{'keep-all'} || scalar(@positive_opts) == 0) {
        foreach my $prune_entry (@{$backup_group}) {
+           # preserve additional information like 'protected'
+           next if $prune_entry->{mark} && $prune_entry->{mark} ne 'remove';
            $prune_entry->{mark} = 'keep';
        }
        return;