[pmg-devel] [PATCH pmg-api 1/2] pbs: api: add statistic parameter to run_backup

Dietmar Maurer dietmar at proxmox.com
Wed Nov 18 19:34:23 CET 2020


why does this default => 1 ?

Statistics are large, and not really required for fully functional restore.
IMHO, I want backups as small as possible.
 
> On 11/18/2020 6:59 PM Stoiko Ivanov <s.ivanov at proxmox.com> wrote:
> 
>  
> Without it the backup does not include the statistics database
> 
> Reported-by: Martin Maurer <martin at proxmox.com>
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>  src/PMG/API2/PBS/Job.pm | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/PMG/API2/PBS/Job.pm b/src/PMG/API2/PBS/Job.pm
> index 793ad88..a0d942a 100644
> --- a/src/PMG/API2/PBS/Job.pm
> +++ b/src/PMG/API2/PBS/Job.pm
> @@ -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";
>  
> -- 
> 2.20.1
> 
> 
> 
> _______________________________________________
> pmg-devel mailing list
> pmg-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel




More information about the pmg-devel mailing list