Last active
December 21, 2015 13:19
-
-
Save danielpcox/6311864 to your computer and use it in GitHub Desktop.
retrync ("retrying rsync") executes resumable rsync uploading/downloading via SSH with progress over and over until the transfer is complete. First stick your public SSH key in ~/.ssh/authorized_keys on the remote server. Original version came from http://blog.iangreenleaf.com/2009/03/rsync-and-retrying-until-we-get-it.html
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 | |
# Usage: retrync path/to/thing/locally user@host:/path/where/you/want/it/remotely | |
trap "echo Exited!; exit;" SIGINT SIGTERM | |
false | |
while [ $? -ne 0 ] | |
do | |
rsync --timeout=10 -P -h -e ssh $1 $2 | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment