Skip to content

Instantly share code, notes, and snippets.

@vongrippen
Created March 15, 2011 14:36
Show Gist options
  • Save vongrippen/870783 to your computer and use it in GitHub Desktop.
Save vongrippen/870783 to your computer and use it in GitHub Desktop.
rsync-config
#!/bin/bash
if [ -e /tmp/rsync-config-lock ]
then
exit 1
fi
touch /tmp/rsync-config-lock
REMOTE_SERVER=$1
BACKUP=$2
rsync -aHAXESz --delete $BACKUP/ -e "ssh -i /root/.ssh/id_rsa" root@$REMOTE_SERVER:$BACKUP/source_config
rm /tmp/rsync-config-lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment