Friday, February 17, 2012

Setting up Time machine on a NAS

I wanted to use my little NAS as a TimeCapsule, because Time Machine on Mac does look very impressive. My NAS has a Debian 6 install base and my Mac has Lion on it.

So I started out browsing to find some ideas on how to approach this.

The best howto document I found is this one: http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/

I first tried to connect to the NAS over CIFS (Samba), but that didn't work. You get a report of Time machine that there is no support for AFP (Apple Filing Protocol). For this to work you need to install the Netatalk package. In Debian 6 there is however only a Netatalk 2.1.x package. Seems like you need a 2.2 verion because this one supports more SSL features which are needed by OS X Lion.

After doing some more digging I found some usable configuration on the following site: http://routerjockey.com/2009/08/28/setting-up-apple-filing-protocol-and-bonjour-under-debian/
This site proposes to build Netatalk 2.2.x from source. I'm however not a fan of that since I need to install plenty of stuff for that (gcc + loads of dev packages). I consider my NAS box to be a server, not a development machine. I did however find a backport of Netatalk 2.2 here: http://www.mikepalmer.net/build-a-netatalk-time-machine-for-osx-lion-using-debian-6-0-squeeze/

Once you install and get Netatalk running you will get an error with OS X Lion stating that the version is not supported. This site tells the following: http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/

For all of you that have OSX lion installed and get a error message about wrong server version.
Add uams_dhx2.so to your config line in the file:
/etc/netatalk/afpd.conf
And the correct line should be:
- -transall -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh

Before you connect to the AFP share make sure to run the following command on your mac:
$ defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

If you do not do this, you can only connect to an official Time Capsule.

A good advice is to also install Avahi. This will make sure that your NAS shares are autodiscovered. Howto do this is also in the very first link (kremalicious.com).

No comments:

Post a Comment