Created
May 30, 2012 13:43
-
-
Save drodriguez/2836414 to your computer and use it in GitHub Desktop.
Rsync backup
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
# This document specifies exceptions to the backup | |
# To specify an EXCLUSION, put "- " (a minus and a space) before the entry | |
# To specify an INCLUSION, put "+ " (a plus and a space) before the entry | |
# Rules are applied IN ORDER | |
# | |
# These rules allow backing up of the iTunes Music Library files, | |
# but not the other contents of ~/Music or ~/Music/iTunes/ | |
+ iTunes/ | |
+ .localized | |
- iTunes Music/ | |
- /Music/* | |
# | |
# These rules prevent backing up of certain caches and the trash | |
- Cache/ | |
- /Library/Caches/ | |
- /.Trash/ | |
- /.Trashes/ | |
# |
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
rsync -avE --exclude-from exceptions.txt "$HOME"/ "$DESTINATION" --delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment