17 November 2010

Building a TimeMachine server with ubuntu 10.10

Ubuntu Server 10.10 64bit
MacOSX 10.6

On GNU/linux machine as root:
apt-get build-dep netatalk
apt-get install cracklib2-dev fakeroot libssl-dev
apt-get source netatalk
cd netatalk...
DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot -us -uc
cd ..
pkg -i netatalk....deb
echo "netatalk hold" | dpkg --set-selections

Edit file /etc/default/netatalk


Edit file /etc/netatalk/afpd.conf (add to the bottom)

- -transall -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh

Edit file /etc/netatalk/AppleVolumes.default

/PATH NAME allow:USERNAME cnidscheme:dbd options:usedots,upriv

PATH is the path in linux
NAME is the name of shared folder
USERNAME is the username for this shared folder

Restart service

/etc/init.d/netatalk restart

Try to use the shared resource with Finder with option "Connect to server"

Install avahi for announce the share

apt-get install avahi-daemon
apt-get install libnss-mdns

Edit file /etc/nsswitch.conf

replace line hosts with this:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns

Create file /etc/avahi/services/afpd.service
Fill with this

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<name replace-wildcards="yes">%h</name>

Restart avahi:

/etc/init.d/avahi-daemon restart

The share now appears automaticaly in macosx

Now the MacOSX part:

Open console and run this:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Add the share as your Time Machine, enjoy!

Posted at BinaryCell


  1. Thanks for this great post!

    I found out that the last line is not necessary if you add 'tm' in the option list of the AppleVolumes.default file.

    So do not apply:

    Open console and run this:

    defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

    but enter this line in the file: AppleVolumes.default file
    /PATH NAME allow:USERNAME cnidscheme:dbd options:usedots,upriv,tm

    Now the share looks like a native time machine device. I used my own login account name as username. It just workd

  2. I could not get the default install available in Ubuntu 10.10 to work. I found this and I'm up and running.

    Minor mistake:
    pkg -i netatalk....deb
    Should be:
    dpkg -i netatalk....deb

    I made some additional changes to /etc/netatalk/AppleVolumes.default

    /PATH NAME allow:USERNAME cnidscheme:dbd options:usedots,upriv,tm volsizelimit:100000

    This marks the share as timemachine compatible (not sure if needed). Also I make the max size 100GB or it would eat up my whole linux disk.

    Thank you!

  3. pkg -i netatalk....deb = dpkg -i netatalk....deb


Disclaimer: In no event shall the blog owner, be liable for any damages, including without limitation, special, indirect or consequential damages, or any damages, whatsoever resulting from access or use, or inability to access or use this Website or arising out of any materials, information, qualifications or recommendations on this Website.