-
Notifications
You must be signed in to change notification settings - Fork 16
vTimeCapsule
The principle is taking a TurnKey Linux Core appliance and modify it in such way that it is accepting the Apple File storage Protocol (AFP) and also is recognized by the Apple TimeMachine client as a (virtual) TimeCapsule: vTimeCapsule.
The benefit of course is that this virtual TimeCapsule is potentially much more resilient that the original physical, single disk, version due to the virtue of the Target Platform. The Target Platform could be anything that the TurnKeyLinux Appliance can call home: a Scale Computing HC3 cluster, A Nimmbox cluster, or your traditional VmWare ESX cluster or anything really. The TurnKey Linux VM can then either be replicated to a second cluster of your choice using internal features of that platform, or it can be conveniently backed up to the TurnKey HUB cloud backup service: tklbam.
The setup represents an elegant way to deploy a fully protected Mac OSX environment, both system and user files, without adding any backup software or licensing costs, plus the added value of the native data resilience as offered by your choice of Target Platform infrastructure.
The following steps where done as modifications to the Core Appliance.
Step 1: Add Netatalk to the Core TurnKeyLinux installation
# apt-get install netatalk libc6-dev avahi-daemon libnss-mdns
Step 2: Configure /etc/nsswitch.conf
# vi /etc/nsswitch.conf
locate the line that reads:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
Add 'mdns' to it so it now reads
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns
Step 3: Edit /etc/avahi/services/afpd.service
# vi /etc/avahi/services/afpd.service
Paste the following code:
``
%h _afpovertcp._tcp548 _device-info._tcp0model=TimeCapsule ``Step 4: Edit /etc/netatalk/AppleVolumes.default
# vi /etc/netatalk/AppleVolumes.default
Scroll down to the bottom of the file and locate the section that reads:
# The line below sets some DEFAULT, starting with Netatalk 2.1. :DEFAULT: options:upriv,usedots
# By default all users have access to their home directories.
~/ "Home Directory"
# End of File
"~/" points to /home/username. You can add another mount point for example /TimeCapsule or similar here. You would now be able to access the share from finder, but in order for TimeMachine to use this storage device we need to make a few more changes to this file: you need to add 'tm' to options:upriv,usedots like so:
``# The line below sets some DEFAULT, starting with Netatalk 2.1. :DEFAULT: cnidscheme:dbd options:upriv,usedots,tm
~/ "Home Directory"
/TimeCapsule "Time Capsule"
Step 5: Edit /etc/default/netatalk The final edit we need to do is to add two lines to the file like so: ``# vi /etc/default/netatalk find the section that looks like this:
PAPD_RUN=no TIMELORD_RUN=no A2BOOT_RUN=no``
Edit the file by adding two more arguments so it looks like this:
``#### Set which legacy daemons to run.
PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no``
That's it!