Skip to content

Instantly share code, notes, and snippets.

@adrianhardy
Last active January 14, 2017 13:06
Show Gist options
  • Save adrianhardy/3402d391e4fc0744d6538f2a98d291ff to your computer and use it in GitHub Desktop.
Save adrianhardy/3402d391e4fc0744d6538f2a98d291ff to your computer and use it in GitHub Desktop.
Trim down TimeMachine backups

Add multiple vendor paths to TimeMachine's ignore list

1. Check for 'SkipPaths' value, these are the paths that TM ignores

defaults read /Library/Preferences/com.apple.TimeMachine.plist

2. (Optional) clear out 'SkipPaths'

defaults delete /Library/Preferences/com.apple.TimeMachine.plist SkipPaths

3. Start adding directories in bulk

find ~/projects -name "node_modules" -maxdepth 5 | sudo xargs tmutil addexclusion -p

find ~/projects -name "vendor" -maxdepth 5 | sudo xargs tmutil addexclusion -p

4. Find large files for funzies...

find ~/projects -size +200000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment