support pbs namespaces

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-05-12 10:42:32 +02:00
parent 80cf523b0f
commit 21a9ec2ad3
2 changed files with 12 additions and 0 deletions

View File

@ -6761,9 +6761,15 @@ sub restore_proxmox_backup_archive {
# for live-restore we only want to preload the efidisk and TPM state
next if $options->{live} && $virtdev ne 'efidisk0' && $virtdev ne 'tpmstate0';
my @ns_arg;
if (defined(my $ns = $scfg->{namespace})) {
@ns_arg = ('--ns', $ns);
}
my $pbs_restore_cmd = [
'/usr/bin/pbs-restore',
'--repository', $repo,
@ns_arg,
$pbs_backup_name,
"$d->{devname}.img.fidx",
$path,

View File

@ -486,6 +486,9 @@ sub archive_pbs {
'--backup-id', "$vmid",
'--backup-time', $task->{backup_time},
];
if (defined(my $ns = $scfg->{namespace})) {
push @$cmd, '--ns', $ns;
}
push @$cmd, "qemu-server.conf:$conffile";
push @$cmd, "fw.conf:$firewall" if -e $firewall;
@ -541,6 +544,9 @@ sub archive_pbs {
devlist => $devlist,
'config-file' => $conffile,
};
if (defined(my $ns = $scfg->{namespace})) {
$params->{'backup-ns'} = $ns;
}
$params->{speed} = $opts->{bwlimit}*1024 if $opts->{bwlimit};
$params->{fingerprint} = $fingerprint if defined($fingerprint);
$params->{'firewall-file'} = $firewall if -e $firewall;