]> git.proxmox.com Git - qemu-server.git/commitdiff
fix pbs-restore call for non raw images
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 4 Jun 2020 08:52:42 +0000 (10:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Jun 2020 08:56:09 +0000 (10:56 +0200)
if we have a format, give it to pbs-restore too
fixes restore of non-raw (e.g. qcow2) images

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/QemuServer.pm

index dcf05df32bc66bd311d87051d1dc941515cbafd5..c262f4aa1cc47583e1f6dad020d2786b6bdedb98 100644 (file)
@@ -6176,6 +6176,8 @@ sub restore_proxmox_backup_archive {
                '--verbose',
                ];
 
+           push @$pbs_restore_cmd, '--format', $d->{format} if $d->{format};
+
            if (PVE::Storage::volume_has_feature($storecfg, 'sparseinit', $volid)) {
                push @$pbs_restore_cmd, '--skip-zero';
            }