Creating a Apple Time Machine on Debian Linux (Jessie)


I fancied updating my Mac laptop to the latest beta so needed an easy way to back it up.

By far the easiest method I’ve found is to use Apples own “Time Machine” this can use a local USB disk, or a NAS.

In this case, we’ll make our Debian linux (Jessie) server into a Time Machine for this purpose.

I found a great guide online with some weirdness explanation about Netatalk here:

# Install our newly built packages
dpkg -i libatalk16_3.1.7-1_amd64.deb netatalk_3.1.7-1_amd64.deb

Fortunately the netatalk devs decided to simplify the netatalk configuration as that was a mess in v2.
Unfortunately that means you need to adjust your configuration now.

Basically the whole configuration now happens in afp.conf and extmap.conf (which you can safely ignore usually). So afpd.conf and AppleVolumes.default andAppleVolumes.system are all depreciated and you should move them out of /etc/netatalk to a safe place.

For a timemachine share you need something like:

path = /backup/timemachine/laura
time machine = yes
# vol size limit is in kB
vol size limit = 500000
valid users = laura

which you can construct from your old AppleVolumes.default and the helpful equivalence table from the netatalk upgrade documentation.

The files /etc/netatalk/afp_signature.conf and /etc/netatalk/afp_voluuid.conf now live in /var/**lib**/netatalk/ (for Debian). The netatalk docs say/var/netatalk but that violates Debian’s file system layout and has hence been fixed in the debianization mentioned above. So move them to /var/lib/netatalk/.

With netatalk 3 the default way to store Apple’s resource forks and assorted cruft has also changed from using .AppleDB subdirectories to storing them in extended attributs (EAs) of the underlying filesystem. The conversion will be done on the fly or – if you feel like speeding things – up removing the .AppleDBdirectories in your Apple vaults and then running:

dbd -r /backup/timemachine/laura

NB: (adjust your path…)

We can enable the systemd units (that’s what the init.d file equivalents are called now :-)) and run the daemons again:

systemctl enable avahi-daemon
systemctl enable netatalk
systemctl start avahi-daemon
systemctl start netatalk

About Louis

Louis is a Developer and all round geek from the UK with a keen interest in web technologies and mobile applications. When not playing with code, he is probably rebuilding a Linux server or watching a Netflix marathon!
This entry was posted in Apple, Debian, Linux and tagged , , , , . Bookmark the permalink.

Leave a Reply