mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-10 01:18:01 +03:00
restore: deal with new backup=0 property string
This commit is contained in:
parent
da8b4189d8
commit
d9faf79016
@ -5261,10 +5261,10 @@ sub restore_update_config_line {
|
|||||||
} elsif ($line =~ m/^((ide|scsi|virtio|sata)\d+):\s*(\S+)\s*$/) {
|
} elsif ($line =~ m/^((ide|scsi|virtio|sata)\d+):\s*(\S+)\s*$/) {
|
||||||
my $virtdev = $1;
|
my $virtdev = $1;
|
||||||
my $value = $3;
|
my $value = $3;
|
||||||
if ($line =~ m/backup=no/) {
|
my $di = parse_drive($virtdev, $value);
|
||||||
|
if (defined($di->{backup}) && !$di->{backup}) {
|
||||||
print $outfd "#$line";
|
print $outfd "#$line";
|
||||||
} elsif ($virtdev && $map->{$virtdev}) {
|
} elsif ($virtdev && $map->{$virtdev}) {
|
||||||
my $di = parse_drive($virtdev, $value);
|
|
||||||
delete $di->{format}; # format can change on restore
|
delete $di->{format}; # format can change on restore
|
||||||
$di->{file} = $map->{$virtdev};
|
$di->{file} = $map->{$virtdev};
|
||||||
$value = print_drive($vmid, $di);
|
$value = print_drive($vmid, $di);
|
||||||
|
Loading…
Reference in New Issue
Block a user