From 80ea4443a3ecf8114f409915b4f2644f921adad1 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 12 Nov 2021 13:37:27 +0100 Subject: [PATCH] jobs: vzdump: fixup prune-schedule conf when we parse the config, we get the 'prune-backup' decoded, but the api call we use wants it as a property string, so encode it here again this fixes having jobs with prune options Signed-off-by: Dominik Csapak --- PVE/Jobs/VZDump.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PVE/Jobs/VZDump.pm b/PVE/Jobs/VZDump.pm index 92b81147..c757eea1 100644 --- a/PVE/Jobs/VZDump.pm +++ b/PVE/Jobs/VZDump.pm @@ -72,6 +72,12 @@ sub run { delete $conf->{$opt} if !defined($props->{$opt}); } + # fixup prune-backups, we get it decoded but want it as string parameter + $conf->{'prune-backups'} = PVE::JSONSchema::print_property_string( + $conf->{'prune-backups'}, + 'prune-backups', + ) if $conf->{'prune-backups'} && ref($conf->{'prune-backups'}) eq 'HASH'; + $conf->{quiet} = 1; # do not write to stdout/stderr PVE::Cluster::cfs_update(); # refresh vmlist