Ajout d'options pour rsync

This commit is contained in:
admin666 2023-11-22 10:53:03 +01:00
parent a92a255d3c
commit 1c185e0543
1 changed files with 3 additions and 2 deletions

View File

@ -41,10 +41,11 @@ function clean_exit() {
vm=$1 vm=$1
dest=$2 dest=$2
backuphost=$3 backuphost=$3
rsync_options=$4
generic_image="/srv/vmverse/installation/generic.a-lec.org.raw" generic_image="/srv/vmverse/installation/generic.a-lec.org.raw"
if [[ $# != 3 ]] if [[ $# < 3 ]]
then then
echo "ERROR: 3 parameters required : vm domain, destination path, backup host" echo "ERROR: 3 parameters required : vm domain, destination path, backup host"
exit 1 exit 1
@ -92,7 +93,7 @@ borg mount root@${backuphost}:/var/backups/borg/${vm}.repo::${DATES[backupdate]}
# Syncing # Syncing
echo "Syncing now !" echo "Syncing now !"
sleep 1 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 # Cleaning up
echo -e "\nOK\n" echo -e "\nOK\n"