From 2a88085d61961cd0887d28c65e953fd91c4e227e Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 10 Feb 2015 14:41:29 +0100 Subject: [PATCH] Fix path for image based disks stored on / when LVM snapshots are used --- virt-backup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virt-backup b/virt-backup index 430f60b..219564a 100644 --- a/virt-backup +++ b/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 {