While it makes no difference for pruning itself, protected backups are
additionally protected against removal. Avoid the potential to confuse
the two. Also update the description for the API return value and add
an enum constraint.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
type => 'integer',
},
'mark' => {
- description => "Whether the backup would be kept or removed. For backups that don't " .
- "use the standard naming scheme, it's 'protected'.",
+ description => "Whether the backup would be kept or removed. Backups that are" .
+ " protected or don't use the standard naming scheme are not removed.",
type => 'string',
+ enum => ['keep', 'remove', 'protected', 'renamed'],
},
type => {
description => "One of 'qemu', 'lxc', 'openvz' or 'unknown'.",
push @{$backup_groups->{$group}}, $prune_entry;
} else {
# ignore backups that don't use the standard naming scheme
- $prune_entry->{mark} = 'protected';
+ $prune_entry->{mark} = 'renamed';
}
$prune_entry->{mark} = 'protected' if $backup->{protected};
'volid' => "$storeid:backup/vzdump-$vmid-renamed.tar.zst",
'type' => 'unknown',
'ctime' => 1234,
- 'mark' => 'protected',
+ 'mark' => 'renamed',
'vmid' => $vmid,
},
) if !defined($type);
{
'volid' => "$storeid:backup/vzdump-lxc-novmid.tar.gz",
'ctime' => 1234,
- 'mark' => 'protected',
+ 'mark' => 'renamed',
'type' => 'lxc',
},
],