From 883c811f7f7568da5bae5b185ed550088a19cdc7 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Fri, 16 Apr 2021 10:51:27 +0200 Subject: [PATCH] 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 --- PVE/Storage.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index aa36bad..3aa2100 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -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); }