Skip to content

Instantly share code, notes, and snippets.

@HudsonNicoletti
Created February 14, 2022 01:09
Show Gist options
  • Save HudsonNicoletti/8304850abbe19bbf6d8467b9553b115f to your computer and use it in GitHub Desktop.
Save HudsonNicoletti/8304850abbe19bbf6d8467b9553b115f to your computer and use it in GitHub Desktop.
TimeMachine HomeServer

Time Machine HomeServer

So lets install the dependencies ( I am running ubuntu server 2021 )

$ sudo apt install netatalk
$ sudo apt install avahi-deamon

( avahi-deamon not necessary for the netatalk 3.0 because it comes bundled, just a backup )

  • Uncomment timemachine volume in Netatalk config file in /etc/netatalk/afp.conf
[My Time Machine Volume]
path = /home/nicoletti/tmbackup 
time machine = yes

you can change the "My Time Machine Volume" name and the Path change for your server

create avahi configuration file:

$ sudo touch /etc/avahi/services/afpd.service

paste XML config into the file:

$ sudo nano /etc/avahi/services/afpd.service

XML

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->  
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">  
<service-group>  
<name replace-wildcards="yes">%h</name>  
<service>  
<type>_afpovertcp._tcp</type>  
<port>548</port>  
</service>  
<service>  
<type>_device-info._tcp</type>  
<port>0</port>  
<txt-record>model=Xserve</txt-record>  
</service>  
</service-group>

Now lets reetart all services , and we are done !

$ sudo systemctl restart netatalk. service
$ sudo systemctl restart avahi-daemon.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment