Created
January 28, 2016 15:43
-
-
Save erik-pantheon/37c35d4cebad6a0eaf08 to your computer and use it in GitHub Desktop.
rsync on pantheon
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
ENV='ENV' | |
SITE='SITEID' | |
read -sp "Your Pantheon Password: " PASSWORD | |
if [[ -z "$PASSWORD" ]]; then | |
echo "Woops, need password" | |
exit | |
fi | |
while [ 1 ] | |
do | |
sshpass -p "$PASSWORD" rsync --partial -rlvz --size-only --ipv4 --progress -e 'ssh -p 2222' $ENV.$SITE@appserver.$ENV.$SITE.drush.in:files/* ./files/ | |
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