]> git.proxmox.com Git - qemu-server.git/commitdiff
support pbs namespaces
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 12 May 2022 08:42:32 +0000 (10:42 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 12 May 2022 11:45:37 +0000 (13:45 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
PVE/QemuServer.pm
PVE/VZDump/QemuServer.pm

index e0fc36e8161d497454422ac6a247460e7c0ba66b..e9aa248d42e2b2a84f04b7a04800deb80624c39f 100644 (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,
index 17cf7245802c75ea0f6cd6fe481abc9454350acf..7429508241e716cc8ffd092230b963e094192f34 100644 (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;