Last active
May 15, 2019 15:04
-
-
Save kennyLtv/930b5bab9e51f7c0e440b8ecaec315e9 to your computer and use it in GitHub Desktop.
rsync reconnect on a failed transfers
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 --progress <user>@<host>:/usr/www/dmfrenzycom/public /var/www/vhosts/dmfrenzy.com/test/public | |
if [ "$?" = "0" ]; then | |
echo "rsync completed on its own"; | |
exit | |
else | |
echo "We failed, gotta catch them all"; | |
sleep 20; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment