Apple TimeMachine backup server on FreeBSD 8.1

Lars Sommer, [email protected]

Using a FreeBSD server for running Apple TimeMachine backup for several Apple OSX clients.

On FreeBSD:

First, set up an Apple file share server as described earlier.

Then configure netatalk to use a selected folder for Time Machine backup files:
vi /usr/local/etc/AppleVolumes.default
add a line like:
/mnt/data1/TimeMachine_backups/ “Time Machine backup”

mkdir /mnt/data1/TimeMachine_backups/
usr/local/etc/rc.d/netatalk restart

On each OSX client:

Open a terminal and:

Allow to use the afp share for TimeMachine:
$ defaults write TMShowUnsupportedNetworkVolumes 1

Create a sparse bundle (special “file” for containing the backup):
$ hdiutil create -size 300g -type SPARSEBUNDLE -nospotlight \
-volname “megafrugt_0017f2cd15ba.sparsebundle” \
-fs “Case-sensitive Journaled HFS+” -verbose \

“300g” is the maximum size of the backup files. This may be larger or smaller to fit your purposes.
(I have a Macbook with a 160 GB SSD, which uses this 300g size, and a iMac with a quite larger harddrive, which uses a 500g sparsebundle.)

“megafrugt” is the hostname of the OSX client

“0017f2cd15ba” is the network MAC address of your OSX client. This number can be found by typing “$ ifconfig en0 ether” in the terminal.

When the sparsebundle have been created, it must be copied into the Time Machine backup folder on the FreeBSD server.
Afterwards, on the FreeBSD server, the layout should be as e.g.:

ls -l /mnt/tolv.data1/TimeMachine_backups/
drwx–S— 4 ls ls 512 Aug 3 19:24 alufrugt_002332cdfb42.sparsebundle
drwx–S— 4 ls ls 512 Aug 3 19:14 megafrugt_0017f2cd15bb.sparsebundle
drwx–S— 4 ls ls 512 Aug 3 19:04 tvmac_001731ada543.sparsebundle

Start TimeMachine, and choose “Select disk”.
The afp share named “Time Machine backup” should appear.
Choose it, and you are running.

Personally I click “Options”, and selects several items to be excluded from the backup.
I only backup my own home folder, and thereby selects e.g. /Applications, /Developer, /Library, /opt and “System Files and Applications”.

Leave a Reply

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *