This is a tutorial about how to make Ubuntu server a Mac Time Capsule. What we need is a functional PC that can install Ubuntu and a Mac machine. This server can be used as not only a file server, but also a Time Machine for Mac backup.
The systems I am using are Ubuntu Server 16.04 LTS and OS X 10.11.5.
Now let’s get it started!
Step 1. Install Ubuntu (Server) 16.04 LTS on your server machine.
Install the LAMP server, OpenSSH server, and Samba file server. Wired network required.
After the installation finished, you may login the server via your Mac machine. Below are some optional configurations.
[Optional] Add new user:
$ sudo useradd -c “King the Brave” -m -s /bin/bash King
$ sudo passwd sam # you may use this to reset root’s password
$ sudo usermod -aG sudo King
[Optional] Delete old user
$ sudo userdel -r old_king # with “-r”, we can delete the home directory for “old_king”
Step 2. Mount your backup disk on Ubuntu.
$ sudo lshw -C disk # to determine the hard drive information
$ sudo fdisk /dev/sda # and create a new partition in the fdisk program by typing “n”
$ mkdir ~/Xserve # as a mount point
$ sudo mount /dev/sda ~/Xserve # to mount the hard drive
Step 3. Configurations.
$ sudo apt-get install netatalk libc6-dev avahi-daemon libnss-mdns $ sudo vim /etc/nsswitch.conf # to replace the hosts line as below: hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns $ sudo vim /etc/avahi/services/afpd.service # to edit as below: <?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>
$ sudo vim /etc/netatalk/AppleVolumes.default # to edit as below:
# change the line ~/ to:
$ sudo vim /etc/default/netatalk # to edit as below:
# uncomment/ add the entries below:
Step 4. Restart the services.
$ sudo service avahi-daemon restart
$ sudo service netatalk restart