Using Ubuntu for Time Machine in Snow Leopard
Over a year ago Matthias Kretschmann posted an excellent guide on how to use Ubuntu as a Time Machine backup server. The guide is quite well written all the configuration steps worked, but I received Error 45 creating backup disk image when Time Machine ran. Some more research revealed that this is because of changes to the sparse bundle image in Snow Leopard.
To make it work I had to create my own sparse bundle with a plist file in it to associate my MacBook’s unique id with the time machine image. Leopard and earlier releases of OS X would create a sparse disk image with the name from the network cards mac address, but in Snow Leopard it uses the computer Hardware UUID. I imagine this is because notebooks can have more than one mac address, one for wired and one for wireless.
How to create a sparse bundle in Snow Leopard
Step 1: Create the disk image with your computer’s name:
hdiutil create -size 500G -fs HFS+J -volname 'Time Machine Backup' -type SPARSEBUNDLE computer_name.sparsebundle</tt>
Step 2: Create a file called
com.apple.TimeMachine.MachineID.plist inside the sparsebundle folder and fill it with the following:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.backupd.HostUUID</key> <string>UUID_STRING</string> </dict> </plist>
Make sure you replace UUID_STRING with your unique machine identifier. This can be found by loading System Profiler (Hardware UUID).
Step 3: Transfer the sparse bundle disk image to your Ubuntu computer:
rsync -avP computer_name.sparsebundle [email protected]:~/