OS X Lion Time Machine backup to Debian

When OS X Lion was released I was eager to try out the updated FileVault and Time Machine features. Moving from an encrypted home directory to true full-disk encryption was a dream. I was also quite excited to find out if the new implementation of FileVault would work well with Time Machine.

I’d previously set up a Time Machine volume on my Debian file-server by installing netatalk and avahi.

Unfortunately, it seems OS 10.7 (Lion) requires netatalk 2.2, which is currently in beta. However, it’s quite simple to install the beta version of the package and it seems to run just fine.

To install netatalk 2.2~beta4-1 you’ll need to add the following line to your /etc/apt/sources.list file:

deb http://debian.oregonstate.edu/debian sid main

You can also use any of the mirrors listed here if they’re closer.

Then run the following commands to install or upgrade netatalk:

$ sudo apt-get update
$ sudo apt-get install netatalk

If you had a previous install of netatalk it may detect changes to your local configuration files. By default the installer will keep the local copies of your files. This behavior is fine in this case.

After the install has finished run $ dpkg -s netatalk | grep -i version to ensure it was successful.

The netatalk service will be restarted by the installer after it completes. You may need to give it a few seconds to spin back up before trying to connect to it.

Your Time Machine backups in OS X Lion should now work correctly!

At this point you may want to comment out or remove the line you added to /etc/apt/sources.list so that you don’t inadvertently upgrade other packages to an unstable branch. After removing the line simply run $ sudo apt-get update one more time.

Update: Found the official Netatalk documentation.

Update 2: Here is the contents of both my afpd.conf and AppleVolumes.default files.

Update 3: Unfortunately, I can’t really provide support for any issues you might have with this. However, please keep your comments coming if you think they’ll be useful for other users attempting to get this working for themselves.