POSTS
Setting up timemachine backup capability on linux (ubuntu)
I used to use external hard drives for timemachine backups, but I kept forgetting to plug them in after going somewhere with my laptop, or they ran out of space, or for some other reason, kept needing to change my solution.
I decided using my linux desktop/server was a better path, since it’s on a lot of the time, and I trust the tooling for dealing with filesystems in linux more than diskutil in macos.
If you want to be able to backup your Mac over the network to a linux machine, here’s what I did:
sudo apt install netatalk
sudo mkdir -p /mnt/timemachine
sudo adduser --home /mnt/timemachine timemachine
sudo nano /etc/netatalk/afp.conf
Edit your afp.conf to be something like:
;
; Netatalk 3.x configuration file
;
[Global]
; Global server settings
[TM]
path = /mnt/timemachine
valid users = timemachine
time machine = yes
Now, go ahead and make and mount your desired volumes to /mnt/timemachine, adding them to /etc/fstab and all that. Once you’re done with that, you can continue.
Make positive the timemachine user has rights to everything in the path:
sudo chown -R timemachine:timemachine /mnt/timemachine
Enable netatalk and avahi-demon to run at startup:
sudo update-rc.d netatalk defaults
sudo update-rc.d avahi-daemon defaults
sudo update-rc.d avahi-daemon enable
sudo update-rc.d netatalk enable
sudo service netatalk start
sudo service avahi-daemon start
Now, if you get on your mac and check under time machine preferences, you should see a “disk” called “TM” you can back up to.
If not, you might have to run this in the terminal on your mac:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1