Installation
Install netatalk and avahi-daemon
sudo apt install netatalk avahi-daemon
mkdir /srv/timemachine
Next we need to set the ownership of this folder to our user account.
chown <user>:<group> /srv/timemachine/
In my case, I am using an existing account:
chown john:john /srv/timemachine/
The config of netatalk is saved in /etc/netatalk/afp.conf - we update it as follows (again, replace
your-username
andsrv/timemache
with the values of your choice;your-hostname
will be the server name that appears in the TimeMachine configuration of your Mac):
vi /etc/netatalk/afp.conf
; ; Netatalk 3.x configuration file ; [Global] hostname = deepthought [TimeMachine] path = /srv/timemachine time machine = yes valid users = john vol size limit = 1000000
The vol size limit is set in MB. Setting the vol size limit to 1TB.
Now, enable and start everything
sudo systemctl enable avahi-daemon sudo systemctl start avahi-daemon sudo systemctl enable netatalk sudo systemctl start netatalk sudo systemctl restart avahi-daemon sudo systemctl restart netatalk
Restarting
sudo systemctl restart avahi-daemon sudo systemctl restart netatalk sudo rm -rf /srv/timemachine
Uninstallation
sudo systemctl stop netatalk sudo systemctl disable netatalk sudo systemctl stop avahi-daemon sudo systemctl disable avahi-daemon
References
Reference | URL |
---|---|
TimeMachine backup to a Linux server | https://www.maxhaesslein.de/notes/timemachine-backup-to-a-linux-server/ |