Skip to content

Instantly share code, notes, and snippets.

@ghankerson
Last active October 6, 2015 19:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghankerson/1142360ae789e8bf03d9 to your computer and use it in GitHub Desktop.
Save ghankerson/1142360ae789e8bf03d9 to your computer and use it in GitHub Desktop.
#!/bin/bash
ENV='dev'
SITE='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
while [ 1 ]
do
rsync --partial -rlvz --size-only --ipv4 --progress -e 'ssh -p 2222' ./files/* $ENV.$SITE@appserver.$ENV.$SITE.drush.in: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