5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-24 02:04:10 +03:00

fix pbs-restore call for non raw images

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>
This commit is contained in:
Dominik Csapak 2020-06-04 10:52:42 +02:00 committed by Thomas Lamprecht
parent 77b24c6267
commit 55fb78aa4a

View 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';
}