prune backups: activate storage
which also checks whether the storage is even enabled. VZDump jobs already activate the storage, but more direct calls via API/CLI didn't do so yet. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
f7a95153d6
commit
883c811f7f
@ -1628,6 +1628,8 @@ sub prune_backups {
|
||||
$keep = PVE::JSONSchema::parse_property_string('prune-backups', $scfg->{'prune-backups'});
|
||||
}
|
||||
|
||||
activate_storage($cfg, $storeid);
|
||||
|
||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||
return $plugin->prune_backups($scfg, $storeid, $keep, $vmid, $type, $dryrun, $logfunc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user