Skip to content

Instantly share code, notes, and snippets.

@metaskills
Created December 7, 2009 19:30
Show Gist options
  • Save metaskills/251033 to your computer and use it in GitHub Desktop.
Save metaskills/251033 to your computer and use it in GitHub Desktop.
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