]> git.proxmox.com Git - pve-storage.git/commitdiff
prune backups: activate storage
authorFabian Ebner <f.ebner@proxmox.com>
Fri, 16 Apr 2021 08:51:27 +0000 (10:51 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Jun 2021 08:11:17 +0000 (10:11 +0200)
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>
PVE/Storage.pm

index aa36badfbb962edbf4b8b468dc4ac07a1488511b..3aa21008b17d10360430371f6ddab6ca25ea3102 100755 (executable)
@@ -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);
 }