Skip to main content

Use Debian 10 as a 🔄 Time Machine server

Everyone makes backups, right? Yeah, me neither. I mean, I do make backups, but not as regularly as I should.

Every Mac that was sold in the last 15 years (or thereabouts) comes with an excellent piece of software called Time Machine. It’s set and forget, You do need a place to backup to, though. I own a NAS that runs Debian 10 and it currently has about 💾 12TB worth of storage space and there is still a few TBs free. Perfect place for my 🔄 Time Machine backups, right?

I already use Samba on my NAS. And after a few seconds of Googeling (actually Duck Duck Go’ing), I found out you need to:

Add this to the [globals] section of smb.conf:

# Time Machine stuff
fruit:aapl = yes
vfs objects = catia fruit streams_xattr
fruit:resource = file
fruit:metadata = netatalk
fruit:locking = none
fruit:encoding = native
mdns name = mdns

and add this section:

[timemachine]
path = /mnt/verylargestoragevolume/timemachine
browseable = Yes
vfs objects = catia fruit streams_xattr
read only = No
inherit acls = Yes
fruit:time machine = yes

Tadaa!

screenshot of time machine

This depends on Samba 4.9.1 or higher. Which Debian 10 ships with. That version comes with some Apple specific Samba extensions (fruit I guess) which makes this all work.

Hope you found this useful.