diff --git a/restore.sh b/restore.sh index 948b9ff..aa7a4b4 100755 --- a/restore.sh +++ b/restore.sh @@ -75,9 +75,11 @@ mkdir -p /mnt/${vm} mkdir -p /mnt/${vm}-remote mkdir -p $(dirname ${dest}) -# Creating new disk -echo "Creating new disk..." -cp --reflink ${generic_image} ${dest} +# Creating new disk if necessary +if [ ! -e ${dest} ]; then + echo "Creating new disk..." + cp --reflink ${generic_image} ${dest} +fi # Mounting echo "Mounting devices..."