Ajout d'options pour rsync
This commit is contained in:
parent
a92a255d3c
commit
1c185e0543
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue