Created
December 12, 2017 18:29
-
-
Save dphiffer/deaae4cf98e40072f26a1710ea5053c8 to your computer and use it in GitHub Desktop.
rsync backup
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
**/Library/Developer | |
**/Library/Logs | |
**/Library/Caches | |
**/Library/Mail | |
**/Library/com.apple.nsurlsessiond | |
**/Library/Accounts | |
**/Library/Address?Book?Plug-Ins | |
**/Library/Assistant | |
**/Library/Calendars | |
**/.cache | |
**/.vagrant.d/boxes | |
**/.vagrant.d/cache | |
**/.Trash | |
**/tmp | |
*.nobackup | |
*.tmp | |
**/.heroku | |
**/.npm | |
**/.DS_Store | |
**/.localized | |
Adobe/ | |
PHP Manual/ | |
tiles.seoul/ | |
vpn/ | |
**/node_modules | |
CheckIn/ | |
Ghost-0.11.3/ | |
**/.git | |
**/.scrapy | |
tiles.zip | |
tiles/ | |
tiles.seoul/ | |
tiles.tw/ | |
cordova-test/ | |
explore/ |
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
#!/bin/sh | |
echo "Documents" | |
date | |
rsync -r -v --ignore-existing --exclude-from=backup-exclude.txt \ | |
"/Volumes/Macintosh HD 1/Users/dphiffer/Documents/" \ | |
/Volumes/dphiffer/dphiffer-work/dphiffer/Documents/ | |
echo "Desktop" | |
date | |
rsync -r -v --ignore-existing --exclude-from=backup-exclude.txt \ | |
"/Volumes/Macintosh HD 1/Users/dphiffer/Desktop/" \ | |
/Volumes/dphiffer/dphiffer-work/dphiffer/Desktop/ | |
echo "dot-ssh" | |
date | |
rsync -r -v --ignore-existing --exclude-from=backup-exclude.txt \ | |
"/Volumes/Macintosh HD 1/Users/dphiffer/.ssh/" \ | |
/Volumes/dphiffer/dphiffer-work/dphiffer/dot-ssh/ | |
echo "Sites" | |
date | |
rsync -r -v --ignore-existing --exclude-from=backup-exclude.txt \ | |
"/Volumes/Macintosh HD 1/Users/dphiffer/Sites/" \ | |
/Volumes/dphiffer/dphiffer-work/dphiffer/Sites/ | |
echo "All done" | |
date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
backup.sh
to include--dry-run
with each call torsync
./backup.sh > backup.txt
backup.txt
, make adjustments tobackup-excludes.txt
in case you don't want certain folders--dry-run
and run it again