Created
December 1, 2012 15:15
-
-
Save pwenzel/4182838 to your computer and use it in GitHub Desktop.
Automatically resume rsync over SSH after broken connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while [ 1 ] | |
do | |
rsync -avz --partial source dest | |
if [ "$?" = "0" ] ; then | |
echo "rsync completed normally" | |
exit | |
else | |
echo "Rsync failure. Backing off and retrying..." | |
sleep 180 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is rsync is running but the transfer has stopped for some reason but rsync has not exited?