How do I trim my Time Machine backups and find and exclude frequently-updated large files from bloating it?
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:
- 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
- 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.
- For each one
- 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)
- 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
To find the files that may be too large, or unnecessarily backed up, I use Disk Inventory X, an application that scans your current hard drive contents and gives you a visual representation of the files on your HD as well as the space they are taking up. (I've used with Leopard and Snow Leopard)
Once you identify any files as ones you don't want a bunch of back-ups of:
- connect your time machine backup drive
- click on the time machine logo in the menu bar
- select "Enter Time Machine"
- navigate to and select those files/folders in the Time Machine window
- click on the gear menu icon
- select "Delete all backups of
Time Machine will prompt for your password and delete all of the backups of the file/folder. You can then exclude these files/folders from future backups. To do so:
- go to the Time Machine preference pane in the System Preferences
- click "Options..."
- add the file/folder you wish to exclude from future backups
Note: Files such as sleepimage are system files, and removing from backup could cause unexpected behavior if you ever need to restore your system from a Time Machine Backup. sleepimage is a file that is the size of the amount of memory in your computer. Actually, I'm not even sure that Time Machine backs up this file. The moral: dont delete system files from your Time MAchine backup, use this method only for your personal files such as your iTunes Media folder or your iPhoto Library. Also, files which I exclude from backups I make sure to keep my own personal backup on a different hard drive.
- Enter Time Machine
- Browse to the large file(s) in question.
- Ctrl+Click/Right-Click on them, go to 'Delete all backups...' option.
- It will need admin privs, escalate.
- Do this for all your files.
Now, go to the TM Preferences, click on the "Options" button. Add the files to your exclusions list.