Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

savar

macrumors 68000
Original poster
Jun 6, 2003
1,950
0
District of Columbia
I just set up Time Machine, and in order to make my backups efficient, I'm trying to think what kind of stuff to exclude. I want a full, working backup, so that if I needed to I could have a complete, bootable restore in less than an hour. With that in mind, here's what I excluded so far:

1) My 2nd external hard drive. It's filled with videos and wouldn't fit anyway. I figure if that drive goes down I'll recover what I can from it and re-rip the rest.
2) My downloads folder. I just download so much crap here that I usually throw away instantly or else move. Plus the downloads folder usually has 2 copies of everything: compressed and uncompressed. Even worse, if the download is a .tar.gz, it has 3 copies of the file.
3) My VMWare images folder. Time machine will back this sucker up every hour that I'm using one of the virtual machines (due to the fact that the guest OS is storing virtual memory in the image file), which would completely kill my ability to go "back in time" since it would fill up my drive very quickly.
4) Anything that's already version controlled elsewhere. I have all my code in a subversion repository on another server, so I don't see a point in backing that up. The backup would just be cluttered anyway.

Anything else? I like the idea of making really thorough backups, so I don't want to be stingy with drive space, I'm really just focusing on providing as much "history" as possible in backup.
 
I'd like to know some good ideas of what to exclude. I notice that sometimes when I don't even make changes to any documents, Time Machine backs up something, even if it's 8MBs of something. I already excluded my FireFox cache folder thing.

What other places are good to exclude?
 
I tell mine to exclude my downloads, music and movies folders. Everything else can get backed up since it is the most important to me, and honestly, doesn't change that much.

My Music folder gets synced with via my ipod, so that is covered
My Downloads folder is a temp dumping ground
My Movies folder is also sort of a dumping ground.
 
I actually created a folder called "Excluded from Backup" just for things that I may be working on and not get wrapped up in an hour.

Say I need to create multiple copies of a file I'm working on, or just need to unzip a package to see what's in it, or a spot to dump my videos / mp3s before I can clean them up and edit them and bring them into iTunes.
 
I'd like to know some good ideas of what to exclude. I notice that sometimes when I don't even make changes to any documents, Time Machine backs up something, even if it's 8MBs of something. I already excluded my FireFox cache folder thing.

What other places are good to exclude?

I noticed last night while I was checking email that the backup drive got really busy all of a sudden. That surprised me because I wasn't really doing anything. After it was done, I went in to see what got backed up. This is the method I used (in Terminal):

$ cd /Volumes/Time Machine/Backups.backupdb/<Computer Name>/Latest/<HD Name>
$ find . -links 1

This should find all files which were just copied over to the most recent backup. The "-links 1" means look for files with only one hard link; in theory this should exclude any files which time machine had previously backed up, because TM would simply create a hard link to the already existing file, and that file would then have #links >= 2.

I was surprised to see that it returned thousands of files, including a bunch of stuff in my music library. I'm guessing that any song which I had listened to that day, or changed the rating for -- it probably had updated metadata which caused the whole song file to be re-copied?? or maybe my method isn't good. Any ideas?

I'm going to try again as soon as I get home today and see what else has changed. In theory, Apple should automatically be excluding any known caches such as Safari caches or Finder thumbnail caches, etc. From what I've read on other forums, TM is still pretty buggy.
 
On my Macbook everything bar one specific folder which contents this years work as I used Time Machine to backup to a small partition on the internal drive. (This is to only stop my stupidity of deleting something I need).

Shame Time Machine doesn't support multiple profiles so I could get a full Time Machine backup when I connect my external.

To have a full backup at the moment I use SuperDuper which gives me a bootable copy so I find this situation to be a better backup/stopping stupidity solution.
 
$ cd /Volumes/Time Machine/Backups.backupdb/<Computer Name>/Latest/<HD Name>
$ find . -links 1

This should find all files which were just copied over to the most recent backup. The "-links 1" means look for files with only one hard link; in theory this should exclude any files which time machine had previously backed up,

I would have thought it would do that too. OS X practice appears different, though. Explain this:

% ls -li '2008-01-21-155117/Macintosh HD/Applications/DivX Player.app/Contents/MacOS/Resources/Project Assets/Images/Desktop Dimmer.a32' '2008-01-21-163409/Macintosh HD/Applications/DivX Player.app/Contents/MacOS/Resources/Project Assets/Images/Desktop Dimmer.a32'
1729179 -rwxrwxrwx+ 1 root admin 1754 26 nov 16:02 2008-01-21-155117/Macintosh HD/Applications/DivX Player.app/Contents/MacOS/Resources/Project Assets/Images/Desktop Dimmer.a32
1729179 -rwxrwxrwx+ 1 root admin 1754 26 nov 16:02 2008-01-21-163409/Macintosh HD/Applications/DivX Player.app/Contents/MacOS/Resources/Project Assets/Images/Desktop Dimmer.a32

Two of the same file. Backups 1 hour apart. Same inode number. But both with link count showing as "1". Maybe hfs uses link count somewhat differently?

In theory, Apple should automatically be excluding any known caches such as Safari caches or Finder thumbnail caches, etc. From what I've read on other forums, TM is still pretty buggy.

This time, Apple follows your theory. At least with OS X 10.5.1, ~/Library/Cache and some other stuff is automatically excluded. Very nice. Once again the potential of hardware/OS/software vendor all combined shows itself. Stuff just works. (Just run a diff -r on your Library directory and a backup to see other stuff it skips--Address book cache, and other very specific stuff that would only screw up restores.)
 
To answer my puzzlement from the previous post:
I believe it may be the case that Time Machine hard links directories themselves. Apparently this capability was added to OS X 10.5. Pretty neat--I don't think any other file system has that capability. Saves a ****-ton of inodes, I'm sure. That's why those unchanged files have the same inode but a link count of 1.

Clever Apple, out UNIX-ing UNIX.

Now if they'd only implement a filesystem with snapshots, Time Machine would really be cool.
 
To answer my puzzlement from the previous post:
I believe it may be the case that Time Machine hard links directories themselves. Apparently this capability was added to OS X 10.5. Pretty neat--I don't think any other file system has that capability. Saves a ****-ton of inodes, I'm sure. That's why those unchanged files have the same inode but a link count of 1.

Clever Apple, out UNIX-ing UNIX.

Now if they'd only implement a filesystem with snapshots, Time Machine would really be cool.

Yeah, I read that in the Ars review of Leopard. Apparently directory hard links are very dangerous, so you can't create them using "ln", but the system call to do it is in there somewhere, and Time Machine is using it.

Makes it trickier to see what Time Machine is really doing though. I guess you could start by looking at which directories changed and ignoring normal files. I don't have my time machine volume mounted now or else I would check it out.
 
I'll add to this old thread. It was very helpful.

I also color labeled all my exclusions RED so i know at a glance in finder. While it is usually the root folder that is excluded, i usually dont have too many sub-folders in downloads, music, etc.
 
...and of course, there is no reason to back up the Boot Camp partition, at least with TM. I use Winclone and another external partition for that.
 
I actually created a folder called "Excluded from Backup" just for things that I may be working on and not get wrapped up in an hour.

Say I need to create multiple copies of a file I'm working on, or just need to unzip a package to see what's in it, or a spot to dump my videos / mp3s before I can clean them up and edit them and bring them into iTunes.

pretty similar with me. I excluded my desktop because i have no icons (exept from my hdd icon) and i use it for temporary work
 
Does anyone else exclude the OS itself from Time Machine backups? I'm thinking that if ever I need to fully restore from backup, I'll do a fresh install of OS X from the install DVD, reinstall apps, then restore user stuff from Time Machine to get rid of artifacts.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.