Time Machine Backups – How to Trim and Exclude Large Files

macmacostime-machine

Time Machine is nice because it Just Works and it does its magic in the background. But left to itself, it can really swell up due to either large files that you don't really need backed up slipping in and frequently-changing files you don't really need every version of.

How can I

  1. Remove files from backups?
  2. Find and exclude files that I don't want backed up (e.g. frequently changing ones)

Best Answer

Remove backups

You can remove files from backups by viewing the enclosing folder in the Finder, then enter Time Machine. Find the file or folder, right/control-click and choose either delete that backup, or delete all backups (versions) of the file. (See this answer)

Find and exclude files

The best way I've found to hunt down and remove files from backups is this:

  1. Use GrandPerspective to scan your backup of your drive. If you backup your main disks to a drive called "Backup Drive", then scan Backup Drive/Backups.backupdb/Yourcomputername
  2. GrandPerspective will show you a nice graphical representation of disk usage, showing every copy of each file on the backup, so if you have a huge 5 gig file that's changed 5 times, you'll see 6 big blocks. Find these repeat offenders, starting with the biggest blocks you see.
  3. For each one
    1. Exclude it from future backups: Open the Time Machine pref pane in System Preferences and click Options. Click the plus and navigate to the offending file/folder on your actual drive (not the backup drive)
    2. Nuke it from all backups per the instructions above ("Remove backups")

What to exclude

This answer suggests some stuff you might want to exclude. Some more good stuff to exclude that I found using GrandPerspective:

  • ~/.dropbox (this is where dropbox keeps its internal DB, which can get HUGE if it caches versions of old files)
  • Some people exclude their Dropbox directory because it keeps revisions on its server, but I let Time Machine do it too for extra redundancy and control.
  • Your Downloads folder (mine's in dropbox anyway)
  • Folders where importers put things that you move every time, e.g. Easy VHS to DVD conversions, imports of movies from my Flip video camera, etc.
  • Music/Podcasts (these eat up a lot of space and for most I can get back-episodes if I need, plus I never want to :P)
  • ~/Library/Application Support/SyncServices omg this changes everytime you sync. I had a gajillion copies on my Time Machine drive
  • /Library/Updates the OS likes to keep copies of the packages from automatic updates. Why? who knows but you don't need 'em UAYOR: there's probably a reason Apple doesn't exclude them, so a full restore might be more of a pain if you do this
Related Question