Created
December 7, 2009 19:30
-
-
Save metaskills/251033 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
myrsync_src="/Users/kencollins/Work Shed" | |
myrsync_dest="/Volumes/backup/Exchange/Work Shed" | |
function mount_backup () { | |
if [[ ! -d /Volumes/backup ]]; then | |
mkdir /Volumes/backup | |
mount_afp afp://user:[email protected]/backup /Volumes/backup | |
fi | |
} | |
function push_wshed () { | |
mount_backup | |
sudo /opt/local/bin/rsync -av --crtimes --super --ignore-errors --hard-links --acls --fileflags --delete "${myrsync_src}/" "${myrsync_dest}" | |
} | |
function pull_wshed () { | |
mount_backup | |
sudo /opt/local/bin/rsync -av --ignore-errors --delete "${myrsync_dest}/" "${myrsync_src}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment