]> git.proxmox.com Git - pmg-api.git/commitdiff
pbs: api: add statistic parameter to run_backup
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 18 Nov 2020 17:59:34 +0000 (18:59 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Nov 2020 18:24:08 +0000 (19:24 +0100)
Without it the backup does not include the statistics database

Reported-by: Martin Maurer <martin@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/API2/PBS/Job.pm

index 793ad88d1ecd2d9e9c3dc5d331eeeb28c9899c27..a0d942af206c51c0e5488e3843dabc6c9f7e243a 100644 (file)
@@ -266,6 +266,12 @@ __PACKAGE__->register_method ({
                description => "Proxmox Backup Server ID.",
                type => 'string', format => 'pve-configid',
            },
+           statistic => {
+               description => "Backup statistic databases.",
+               type => 'boolean',
+               optional => 1,
+               default => 1,
+           },
        },
     },
     returns => { type => "string" },
@@ -284,6 +290,8 @@ __PACKAGE__->register_method ({
        die "PBS remote '$remote' does not exist\n" if !$remote_config;
        die "PBS remote '$remote' is disabled\n" if $remote_config->{disable};
 
+       $param->{statistic} //= 1;
+
        my $pbs = PVE::PBSClient->new($remote_config, $remote, $conf->{secret_dir});
        my $backup_dir = "/var/lib/pmg/backup/current";