OS-X Lion requires netatalk > 2.2.1, however there seems to be no package for that available on the regular sources, but you can also build it yourself!
That is the strategy we will follow in this post. As with many things once you know the recipe the procedure is straightforward, but I've found many posts our there of people who tried but didn't succeed. Follow the path below and you will become a happy time traveller!
Prepare for installation
Before doing so make sure you have a compiler installed. if not
sudo aptitude install build-essential
You will also need checkinstall:
sudo apt-get install checkinstall
Download netatalk sources
Now download the latest version of netatalk. In this post we will use 2.2.1 as an example but change the lines below accordingly to the latest version number:
sudo apt-get install libdb4.8-dev libcrack2-dev libssl-dev libgcrypt11-dev
tar xvf netatalk-2.2.1.tar.gz
./configure -enable-debian --enable-zerconf
Install the package properly using checkinstall:
sudo checkinstall --pkgname=netatalk --pkgversion="$(date +%Y%m%d%H%M)" --backup=no --deldoc=yes --default
Note that you netatalk config files are now in a different location in case you upgrade from a previously installed package:
In that case we don't want to use /etc/netatalk. So if this directory still exists remove it:
Adjust your AppleVolumes.default config:
sudo nano /usr/local/etc/netatalk/AppleVolumes.default
Add tm to the default options to AppleVolumes.default:
and comment out ~/ home directory entry in the last lines of the file
And add the following line, below:
/data/backup/TimeMachine "TimeMachine" cnidscheme:dbd allow:timemachineuser
Now make sure that the cnid_metad demon is running, you activate it in
sudo nano -w /etc/default/netatalk
somewhere half way you will find the following section:
Now you will need to install avahi
sudo apt-get install avahi-daemon
Now you will need adjust the config file as indicated below:
sudo vim /etc/avahi/services/afpd.service
## Add this to new file:
Add the timemachine user:
sudo adduser timemachine
create the required backup folder:
sudo mkdir /data/backup
sudo mkdir /data/backup/TimeMachine
sudo chown timemachine /backup/TimeMachine
Now you can start netatalk and avahi:
sudo /etc/init.d/netatalk restart && service avahi-daemon reload
You’re Ubutu machine is now ready for action!
The Lion setup:
First you will need to enable unsupported drives in time machine. To do this open a terminal window and execute:
Defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Connect your TimeMachine network Volume:
Open Finder, from the menu bar choose go -> connect to server, and enter in the server address:
Click connect and enter the right password.
Things should work now and you can open your Time Machine, and click “Select Disk…” Choose the mounted drive that you just opened. If prompted for credentials, reenter them. Enable Time Machine and the first backup should fire up.
Your done! Happy timetravelling!
A few notes:
-- If things are all right you won’t need to prepare a sparsebudle file on your Lion machine and copy it to your TimeMachine Volume. Your Lion machine should be able to create one by itself.
-- it could be that I’ve also installed before setting up netatalk:
apt-get install libavahi-client-dev