Fix path for image based disks stored on /

when LVM snapshots are used
tags/virt-backup-0.2.12-1 0.2.9_el5
Daniel Berteaud 10 years ago
parent bf888f40e2
commit 2a88085d61
  1. 3
      virt-backup

@ -385,7 +385,7 @@ sub prepare_backup{
}
my $mp = $lvm;
$mp =~ s!/!_!g;
$mp = "$backupdir.mount/$mp";
$mp = "$backupdir.mount/$mp/";
my $file = $source;
# Try to snapshot this device
if ( $opts{snapshot} ){
@ -426,6 +426,7 @@ sub prepare_backup{
print "An error occured while snapshoting $lvm, live backup will be disabled\n" if ($opts{debug});
$opts{livebackup} = 0;
}
$file =~ s|//|/|g;
push (@disks, {source => $file, target => $target, type => 'file'});
}
else {

Loading…
Cancel
Save