How To: Create Time-Machine-like hourly backups for your FileVault home directory on Mac OS X

If you own a MacBook, you might want to protect your private data from others. For this purpose, Apple has built in the FileVault technology into your MacBook. It basically consists of 128-bit AES encryption for your home directory. FileVault works very well, but it has one major downside: It doesn’t like to play with Time Machine. Time Machine will not backup your home directory every hour, but rather just do backups at logoff. In addition to that, it will just backup the encrypted data, which is stored in a .sparsebundle kind of directory. So Time Machine will backup too much, but at the same time won’t give you the comfort of a non-FileVaulted Time Machine backup.

Enter Carbon Copy Cloner. This is a donationware utility that has various means to backup your data. Originally intended to clone your entire hard drive, Carbon Copy Cloner can do a lot more than that. It can also do regular backups of your home directory, and it will even archive the old files. When scheduling it to do hourly backups, Carbon Copy Cloner will almost work like Time Machine for your FileVaulted home directory. I have set up Carbon Copy Cloner to do hourly backups of my home directory to a .sparseimage (no support for .sparsebundles yet, as it seems) and archive changed and deleted files. For all the other stuff on my Hard Disk, I continue to use Time Machine, because it still is slightly more comfortable and because I’m used to it.

But wait. With the default settings, Carbon Copy Cloner will archive about 30 MB of changed files on every backup. When doing hourly backups, that might become half a gigabyte a day, while Time Machine seems to backup far less. I’ve found a site that explains this difference: Time Machine doesn’t backup some volatile data, e.g. caches and temporary files. You can find the files Time Machine excludes in a file called StdExclusions.plist in the bundle /System/Library/CoreServices/backupd.bundle.

Here are the contents of my version of that file:

  • Library/Application Support/SyncServices/data.version
  • Library/Caches
  • Library/Logs
  • Library/Mail/Envelope Index
  • Library/Mail/AvailableFeeds
  • Library/Mirrors
  • Library/PubSub/Database
  • Library/PubSub/Downloads
  • Library/PubSub/Feeds
  • Library/Safari/Icons.db
  • Library/Safari/WebpageIcons.db
  • Library/Safari/HistoryIndex.sk
So I suggest you exclude those files from your Carbon Copy Cloner backup settings. I also disabled backup of Library/Preferences/VLC/plugins-04041e.dat, which is a cache file for the VLC media player. Because I also have some large XCode projects, I decided not to backup their build results, too. Because all those projects reside below a folder called XCode in my home directory, I created a rule called - XCode/**/build in Carbon Copy Cloner’s advanced settings. This will exclude every directory or file called build in any directory anywhere below the XCode directory. Now my hourly backups are sometimes as small as 1 or 2 MB.

One Response to “How To: Create Time-Machine-like hourly backups for your FileVault home directory on Mac OS X”

  1. [...] Useful solutions Providing you with quick solutions to difficult problems we have stumbled upon. « How-To: Create Time-Machine-like hourly backups for your FileVault home directory on Mac OS X [...]

Leave a Reply

You must be logged in to post a comment.