[pmg-devel] [RFC pmg-api 02/12] Backup: split backup creation and creating tar

Dietmar Maurer dietmar at proxmox.com
Tue Oct 20 07:43:09 CEST 2020


>  
>  sub pmg_backup {
> -    my ($filename, $include_statistics) = @_;
> +    my ($backupdir, $include_statistics) = @_;
> +
>  
>      my $time = time;
> -    my $dirname = "/tmp/proxbackup_$$.$time";
> +    my $dirname = $backupdir // '/var/lib/pmg/backup/current';

Why is $backupdir optional? And why do you use different paths (/tmp vs. /var/lib)?




More information about the pmg-devel mailing list