diff --git a/restore.sh b/restore.sh index 9b09422..f3938ac 100755 --- a/restore.sh +++ b/restore.sh @@ -41,10 +41,11 @@ function clean_exit() { vm=$1 dest=$2 backuphost=$3 +rsync_options=$4 generic_image="/srv/vmverse/installation/generic.a-lec.org.raw" -if [[ $# != 3 ]] +if [[ $# < 3 ]] then echo "ERROR: 3 parameters required : vm domain, destination path, backup host" exit 1 @@ -92,7 +93,7 @@ borg mount root@${backuphost}:/var/backups/borg/${vm}.repo::${DATES[backupdate]} # Syncing echo "Syncing now !" sleep 1 -rsync -ar --info=progress2 --no-i-r --sparse /mnt/${vm}-remote/. /mnt/${vm} +rsync -ar --info=progress2 --no-i-r --sparse ${rsync_options} /mnt/${vm}-remote/. /mnt/${vm} # Cleaning up echo -e "\nOK\n"