# 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,
'--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;
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;