Skip to content

Instantly share code, notes, and snippets.

@csexton
Created May 21, 2014 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csexton/cbea74a0ea265210ef93 to your computer and use it in GitHub Desktop.
Save csexton/cbea74a0ea265210ef93 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd /Users/csexton
# Rsync to Dreamhost
OPTIONS="-e ssh --relative --compress --archive --delete-excluded --progress --human-readable "
SERVER="backup.remote:cs-dewback"
rsync $OPTIONS Projects Pictures Documents $SERVER \
--exclude="OmniFocus Backups" \
--exclude="*vmwarevm" \
--exclude="Apple Marketing Material" \
--exclude="*DS_Store"
# Sync to S3
S3_EXCLUDES="--exclude \".DS_Store\" --exclude=\"*.git/*\" --exclude=\"*vmwarevm\" --exclude=\"tmp\" --exclude=\"*.tmp\""
. ~/.aws/backup.conf
aws s3 sync ~/Pictures s3://dewback-backup/Pictures --delete $S3_EXCLUDES
aws s3 sync ~/Projects s3://dewback-backup/Projects --delete $S3_EXCLUDES
aws s3 sync ~/Documents s3://dewback-backup/Documents --delete $S3_EXCLUDES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment