Skip to content

Instantly share code, notes, and snippets.

@stephenyeargin
Created September 11, 2011 00:14
Show Gist options
  • Save stephenyeargin/1208997 to your computer and use it in GitHub Desktop.
Save stephenyeargin/1208997 to your computer and use it in GitHub Desktop.
Backup of iTunes music folder to external drive using RSync
#!/usr/bin/env bash
echo "Checking to see if /Public/Shared Music/ is mounted ..."
if [[ -d /Volumes/Public/Shared\ Music/ ]]; then
echo "Begin rysync command ..."
rsync -vur --delete --exclude=*.db --exclude=*.info --exclude=.DS_Store ~/Music/iTunes/iTunes\ Music/Music/ /Volumes/Public/Shared\ Music
echo "Done!"
else
echo "ERROR! Remote drive not mounted."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment