If you backup your MacOS X 10.6 machine to a netatalk server, then you may have found that MacOS X 10.7 cannot backup to the same machine. Apparently, the major reason why it's now broken is a lack of « replay cache » which was introduced in AFP 3.3. So what you need to do is upgrade netatalk to version 2.2.x.
UPDATE : I've successfully this setup with MacOS X 10.8 and 10.9.
Let's configure a FreeBSD machine to serve as a Time Machine target for MacOS X 10.7. I'm using FreeBSD 8.2 as this is the production version. If you prefer using a Linux machine, then take a look at this blog post by Steffen L. Norgren.
First, install the latest version of netatalk
sudo portsnap fetch
sudo portsnap extract
sudo make install clean
Then, create a directory where your backup will reside. I use the /export file system, but you can obviously place your backup anywhere you like. Just make sure it doesn't fill your root, /usr and /var partitions.
sudo mkdir -p /export/backup/drobilla
Set the permissions to the same user on both your MacOS X and FreeBSD server. To find out what's your user ID and group ID on your MacOS X machine, open up Terminal and issue the id(1) command:
Create these same UID and GID on the FreeBSD machine and set the new user's password.
sudo pw groupadd -g 20 staff
sudo pw useradd drobilla -u 501 -g 20 -d /usr/home/drobilla \
-s /usr/local/bin/bash -c "David Robillard"
sudo passwd drobilla
Then set the permissions to the backup directory.
sudo chown drobilla:staff /export/backup/drobilla
Now configure netatalk. This is done by editing several files:
Let's start with AppleVolumes.default.
sudo vi /usr/local/etc/AppleVolumes.default
# See /usr/local/AppleVolumes.default.dist for more information.
# There is only two lines in this file.
/backup/drobilla "Backup David" allow:drobilla cnidscheme:dbd options:tm volsizelimit:300000
Then the AppleVolumes.system is actually an empty file. So just create it with the touch(1) command. For more info on this file, check the /usr/local/etc/AppleVolumes.system.dist file.
sudo touch /usr/local/etc/AppleVolumes.system
Now we configure AFP.
sudo vi /usr/local/etc/afpd.conf
# Again, see /usr/local/etc/afpd.conf.dist for more info.
# This file has a single line.
- -tcp -noddp -uamlist uams_dhx.so,uams_dhx2.so -setuplog "default log_info" -cnidserver 127.0.0.1:4700
And the /usr/local/etc/netatalk.conf file. Note that you can change your ATALK_NAME to something other then FreeBSD. This is the name that will show when you will connect via your MacOS X machine.
sudo vi /usr/local/etc/netatalk.conf
# See /usr/local/etc/netatalk.conf.dist for more info.
And finally, we must edit our rc.conf file to enable the new daemons. Note that there is quite a lot more in the rc.conf file, but I've just listed the ones required for the purposes of this blog post.
sudo vi /etc/rc.conf
Optional: now we need to tell syslog to send all AFP related messages to the afpd.log file. So add those two lines at the end of the syslog.conf(5) file.
sudo vi /etc/syslog.conf
Be sure to restart syslog to enable those changes. But first make sure the file exists.
sudo touch /var/log/afpd.log
sudo /etc/rc.d/syslogd restart
And make sure this new file gets rotated so as to prevent it from growing too big. Add a single line to the newsyslog.conf(5) file.
sudo vi /etc/newsyslog.conf
/var/log/afpd.log root:wheel 640 7 1024 * J
Then you can start your netatalk daemon:
sudo /usr/local/etc/rc.d/netatalk start
Be sure to check the system's log to see if everything has started as it should. This is also a good place to check when clients connect to the AFP service.
sudo tail /var/log/messages
That's it from the FreeBSD side. Now take your MacOS X 10.7 machine and connect to your FreeBSD machine. To do so, hit Command-K and type your FreeBSD server's IP address.
At the prompt, enter the user name and password that we just created on the FreeBSD server.
You will see a list of shares that we configured in the /usr/local/etc/AppleVolumes.default file. Select the Backup David share. It will be mounted.
Now open up the Time Machine preferences and select a disk. You should see your new FreeBSD disk there. Select it and run the backup.