Search
Close this search box.

Cheat sheet: Use Ubuntu 14.04 as a Mac OS X Time Capsule

Step 1: Install Netatalk

apt-get install netatalk libc6-dev avahi-daemon libnss-mdns

Step 2: Configure /etc/nsswitch.conf

locate the line that reads:

hosts: files mdns4_minimal [NOTFOUND=return] dns

Add “mdns” at the end. You should have that:

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns

Step 3: edit /etc/netatalk/AppleVolumes.default

Check that you have:

:DEFAULT: options:upriv,usedots

Add a line in the shares like this:

<directory path where to store time machine files> "Time Machine" options:tm allow:<usertoallow>

For me it looks like this for user “stfb”

/mnt/USBDrive/AppleTimeMachine "Time Machine" options:tm allow:stfb

Step 4: add time machine dir + user

mkdir <directory path where to store time machine files>
chown -R <usertoallow>: <directory path where to store time machine files>
adduser<usertoallow> (follow prompt)

Step 5:  in /etc/default/netatalk find section which looks like this

#### Set which daemons to run.
#### If you use AFP file server, run both cnid_metad and afpd.
CNID_METAD_RUN=yes
AFPD_RUN=yes

and edit it so it looks like this:

#### Set which legacy daemons to run.
#### If you need AppleTalk, run atalkd.
#### papd, timelord and a2boot are dependent upon atalkd.
ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

Restart netatalk:

/etc/init.d/netatalk restart

Open time machine preferences on your Mac and select the Time Machine drive we just setup which should be recognisable by the <hostname> of your server.
Initiate the backup.
That’s it !

Share the Post:

Related Posts