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

Loading…
Cancel
Save