The 'performance' option itself defines no 'default' in the schema, so
what happened is that the defaults used by the backends (i.e. QEMU and
proxmox-backup-client) would be used. Luckily, they correspond to the
default values defined in the schema, i.e. in the 'backup-performance'
format. Make the code future-proof and use the actual defaults defined
in the schema instead of relying on that correspondence.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
defined($default) ? ($_ => $default) : ()
} keys %$confdesc_for_defaults
};
+ my $performance_fmt = PVE::JSONSchema::get_format('backup-performance');
+ $defaults->{performance} = {
+ map {
+ my $default = $performance_fmt->{$_}->{default};
+ defined($default) ? ($_ => $default) : ()
+ } keys $performance_fmt->%*
+ };
$parse_prune_backups_maxfiles->($defaults, "defaults in VZDump schema");
- parse_performance($defaults);
my $raw;
eval { $raw = PVE::Tools::file_get_contents($fn); };