Created
May 21, 2014 02:47
-
-
Save csexton/cbea74a0ea265210ef93 to your computer and use it in GitHub Desktop.
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 | |
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