4 ### Runs rsync, retrying on errors up to a maximum number of tries.
5 ### Simply edit the rsync line in the script to whatever parameters you need.
7 # Trap interrupts and exit instead of continuing the loop
8 trap "echo Exited!; exit;" SIGINT SIGTERM
13 # Set the initial return value to failure
16 while [ $?
-ne 0 -a $i -lt $MAX_RETRIES ]
19 rsync
-avz --progress --partial -e "ssh -i /home/youngian/my_ssh_key" /mnt
/storage
/duplicity_backups backupuser@backup.dreamhost.com
:.
22 if [ $i -eq $MAX_RETRIES ]
24 echo "Hit maximum number of retries, giving up."