OSX Time Machine Backups to Solaris ZFS Volume
Tested on Solaris 11.1, Netatalk 3.0.4, and OSX 10.8.4
Goal: Back up the household laptops over the network to a solaris fileserver
This seems to work better with AFP rather than SMB, so I installed netatalk 3.0.4 from source.
Note: This was cobbled together from information contained in a few other blogs -- I don't pretend to be a netatalk expert.
Install Pre-requisite Solaris packages:
pkg install developer/gcc-3 system/library/math/header-math \
developer/gnu developer/gnu-binutils \
developer/gnome/gettext libgcrypt openssl
`</pre>
### Download, build and install netatalk:
<pre>`wget .../netatalk-3.0.4.tar.gz
tar xzf netatalk-3.0.4.tar.gz
cd netatalk-3.0.4
./configure --without-ddp --with-init-style=solaris --prefix=/usr/local/netatalk-3.0.4
make
sudo -s # it didn't like running make install under sudo.
install
`</pre>
### Setup PAM for netatalk
I'm not 100% sure why this would be required, I assume it's something to do with netatalk's PAM implementation.
<pre>`cp /etc/pam.d/other /etc/pam.d/netatalk
`</pre>
### Make a ZFS dataset to store our data
… since time machine is designed to eventually consume all space available, a quota is a good idea.
<pre>`zfs create -o mountpoint=/timemachine tank/timemachine
zfs create -o quota=1tb tank/timemachine/tdehesse
chown tdehesse /timemachine/tdehesse
`</pre>
### Setup Netatalk
<pre>`cat > /usr/local/netatalk-3.0.4/etc/afp.conf <<EOF
;
; Netatalk 3.x configuration file
;
[Global]
; Global server settings
mimic model = MacPro
[timemachine_tdehesse]
path=/timemachine/tdehesse
time machine = yes
EOF
`</pre>
### enable autodiscovery related services
<pre>`root@velocity:bin# svcadm enable svc:/network/dns/multicast:default
root@velocity:bin# svcadm enable svc:/system/avahi-bridge-dsd:default
`</pre>
### Start netatalk
Netatalk was kind enough to include SMF functionality for us :)
<pre>`svcadm enable netatalk
svcs netatalk
STATE STIME FMRI
online 11:11:10 svc:/network/netatalk:default
Setup OSX
This is really simple -- Since netatalk is advertising the volume as being time-machine compatible, the volume should "just work" and appear in the time machine preferences as a regular volume without any client-side hacks, which should help if we ever need to do a bare-metal recovery.