Created
April 20, 2020 22:04
-
-
Save jenyayel/531e568c27a52e8b87fc3d811115f38c to your computer and use it in GitHub Desktop.
Runs rsync with retry
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 \ | |
--progress \ | |
--partial \ | |
--append \ | |
--timeout=30 \ | |
-vz \ | |
-e ssh $src_path $dest_path | |
if [[ $? -eq 0 ]] ; then | |
echo "rsync completed" | |
exit | |
else | |
echo "rsync failure, retrying..." | |
sleep 10 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment