Skip to content

Time Machine for Lion on FreeBSD

More than a year ago I wrote about Using FreeBSD as Time Machine server. With the release of OS X Lion the configuration of the FreeBSD packages deserves an update.

First of all I recommend to install at least netatalk-2.2.1 which was updated in the ports tree on September 10th. I had a couple of problems with previous versions. The package and port have a dependency on avahi-app which implements Zeroconf and replaces howl. Therefore the description about the howl configuration in my previous article is obsolete now.

Apple Filing Protocol

This is my configuration in /usr/local/etc/AppleVolumes.default:

# The line below sets some DEFAULT, starting with Netatalk 2.1.
:DEFAULT: options:upriv,usedots veto:/lost+found/ dbpath:/var/db/afpd/$v

# The "~" below indicates that Home directories are visible by default.
# If you do not wish to have people accessing their Home directories,
# please put a pound sign in front of the tilde or delete it.

This allows sharing all home directories on the FreeBSD file server. It also hides lost+found directories and moves the CNID databases to subdirectories below /var/db/afpd. Make sure you don't run out of space there or the database may become corrupted. You should also create that directory.

Next, the configuration file /usr/local/etc/afpd.conf has the following line:

"Elan" -tcp -noddp -uamlist -ipaddr -mimicmodel Xserve

Elan would be the name showing up in Finder. This version of Netatalk has an easy way to change the icon used in Finder by using the mimicmodel option. I decided to to use the Xserve icon for my FreeBSD server.

Finally the following entries in /etc/rc.conf are necessary to start all relevant services during boot:


This configuration should be sufficient to access your home directory on the FreeBSD server.

Time Machine

Now the Time Machine specific parts. As written in my previous article I wanted to use a dedicated volume for my backups. So I added the volume name to /usr/local/etc/AppleVolumes.default:

/pool/backup/TimeMachine "Time Machine" options:tm volsizelimit:256000 allow:tmbackup

As before tmbackup is the user that will own the backups on the FreeBSD server.

Now create the file /usr/local/etc/avahi/services/afpd.service and put the following XML code into it:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<name replace-wildcards="yes">Time Capsule</name>
   <txt-record>dk0=adVF=0x83,adVN=Time Machine</txt-record>

Make sure to replace 00:15:f2:xx:xx:xx with the MAC address of your network controller. With this file Avahi announces a file server named Time Capsule and a volume Time Machine with the necessary capabilities in your network. The volume name must match the entry used in AppleVolumes.default as shown above.

Finder will even use the Time Capsule icon for it. The code for the icon is derived from the article Specify the Finder icon with Avahi.

Now the setup of your Mac to use the volume offered by the FreeBSD based Time Capsule should work as described in the section Configuration of Time Machine of my previous article Using FreeBSD as Time Machine server.

Trackbacks on : PingBack

Unfortunately, the contents of this trackback can not be displayed.


Display comments as Linear | Threaded

Katsuya on :

Your article helped me a lot. I was troubled with backing up on FreeBSD when I updated to Lion. I came up to your article and the problem has solved. Fielen Danke!

Add Comment

Standard emoticons like :-) and ;-) are converted to images.
Textile-formatting allowed
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Form options

Submitted comments will be subject to moderation before being displayed.