Setting up a Ubuntu Time Machine server for Mac OS X Snow Leopard backups. Netatalk 2.0.5-3 and Ubuntu 9.10 minimal was used for this configuration.


**UPDATE 2014-01-13: The installation procedure has changed with later versions of Ubuntu and netatalk.


1
2
3
4
5
6
7
8
9
10
11
12
wget http://ftp.us.debian.org/debian/pool/main/d/db/libdb4.8_4.8.26-1_i386.deb
dpkg -i libdb4.8_4.8.26-1_i386.deb
wget http://ftp.us.debian.org/debian/pool/main/libg/libgcrypt11/libgcrypt11_1.4.5-2_i386.deb
dpkg -i libgcrypt11_1.4.5-2_i386.deb

apt-get install libcrack2

wget http://ftp.us.debian.org/debian/pool/main/n/netatalk/netatalk_2.0.5-3_i386.deb
dpkg -i netatalk_2.0.5-3_i386.deb

mkdir /storage/TimeMachine
chmod a+rw /storage/TimeMachine
1
vi /etc/netatalk/AppleVolumes.default

change the last part to look like this:

1
2
3
# By default all users have access to their home directories.
#~/                     "Home Directory"
/storage/TimeMachine "TimeMachine" options:tm
1
2
3
4
/etc/init.d/netatalk restart

apt-get install avahi-daemon
apt-get install libnss-mdns
1
vi /etc/nsswitch.conf

add “mdns to end of line to look like this:

1
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns
1
vi /etc/avahi/services/afpd.service

Paste the following code and save:

1
2
3
4
5
6
7
8
9
10
11
12
13
<!--*-nxml-*-->
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>

Reboot the server:

1
init 6

NOTES:
After the machine returns from reboot, you can check to see if everything is running:

ps -ef | grep afpd
ps -ef | grep avahi

Should you need to manually connect to server via finder, you can:

Go —> Connect to Server and type afp://your-server-ip

If you were not able to log in, you can check in /var/log/daemon.log on your linux server for any debug messages.

Comments