Step 1: Install Netatalk
1 2 |
apt-get install netatalk libc6-dev avahi-daemon libnss-mdns |
Step 2: Configure /etc/nsswitch.conf
locate the line that reads:
1 2 |
hosts: files mdns4_minimal [NOTFOUND=return] dns |
Add “mdns” at the end. You should have that:
1 2 |
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns |
Step 3: edit /etc/netatalk/AppleVolumes.default
Check that you have:
1 2 |
:DEFAULT: options:upriv,usedots |
Add a line in the shares like this:
1 2 |
<directory path where to store time machine files> "Time Machine" options:tm allow:<usertoallow> |
For me it looks like this for user “stfb”
1 2 |
/mnt/USBDrive/AppleTimeMachine "Time Machine" options:tm allow:stfb |
Step 4: add time machine dir + user
1 2 3 4 |
mkdir <directory path where to store time machine files> chown -R <usertoallow>: <directory path where to store time machine files> adduser<usertoallow> (follow prompt) |
Step 5: in /etc/default/netatalk find section which looks like this
1 2 3 4 5 |
#### Set which daemons to run. #### If you use AFP file server, run both cnid_metad and afpd. CNID_METAD_RUN=yes AFPD_RUN=yes |
and edit it so it looks like this:
1 2 3 4 5 6 7 8 9 10 |
#### Set which legacy daemons to run. #### If you need AppleTalk, run atalkd. #### papd, timelord and a2boot are dependent upon atalkd. ATALKD_RUN=no PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no |
Restart netatalk:
1 2 |
/etc/init.d/netatalk restart |
Open time machine preferences on your Mac and select the Time Machine drive we just setup which should be recognisable by the <hostname> of your server.
Initiate the backup.
That’s it !