So, when I got the upgrade from Tiger to Leopard on my MacBook Pro, I was looking for a good backup solution. I’ve used rsync in the past, but when I saw that Apple had a new Time Machine backup tool, I was curious to give it a shot. The catch is you basically needed an external USB or Firewire drive, until they recently came out with the Time Capsule. Anyway, tonight I got the itch to really see if I could make Time Machine work without buying extra hardware. I mean, seriously, I’ve got a good hunk of mirrored disk sitting on my home server; that seems like a good place to do backups.
Some googling found me this link to a blogger who’d done it!
I’ll make my own version of this post, since I had a few differences from the original I where I found the info.
First, netatalk is the Apple File Protocol server for Linux. My home server is running Ubuntu Linux 7.10 Gutsy Gibbon release. The default Debian/Ubuntu netatalk package doesn’t cut it, though, as it isn’t compiled against ssl, and Leopard has more stringent security requirements than its predecessors, so we have to custom compile a more secure version of netatalk. (Yes, you could reduce the security requirements, but I’d rather not.)
- Follow the instructions in this ubuntu forum post to compile and install netatalk. After, run “echo “netatalk hold” | sudo dpkg –set-selections” to ensure that your package is not auto-upgraded (thus breaking your install).
- Edit the netatalk configuration to include your backup storage location. The file /etc/netatalk/AppleVolumes.default is where the file server paths are configured. The last line of the default config grants access to home directories and looks like: (~/ “Home Directory”). You’ll need to add a line specifying where you are storing your backups; mine looks like: (/backup/time_machine/ “Time Machine”). Note: I removed the “Home Directory” line, as in general I’m happier using CIFS(Samba) to access my network shares.
- Modify avahi/zeroconf to advertise AFP so that Mac Bonjour will see the fileserver. I followed these directions exactly.
- Each Mac user needing access to the server has to have a corresponding user on the server, and each user needs a .passwd file in their home directory. Follow these instructions for Ubuntu only as it explains the creation of the .passwd file. Note: This is not needed, as far as I can tell, so I wouldn’t do it. I don’t like the idea of having my password in plaintext on my server.
- Create a file named “.com.apple.timemachine.supported” at the root of the intended shared backup volume. (Discussed here in more detail.)
- On your Mac, open a Terminal window and type: “defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1”
I rebooted, but it might not be necessary. After a bit of time, my server showed up under the “Shared” section in Finder’s left column navigation window. I did have to type in my username and password to get it to work, which can be saved in the keychain.
I added my other common shared folders (which I’d previously been accessing via Samba/CIFS). Now I’m backing up with Time Machine AND using my shared files via AFP. My Mac is happy, and I am too.
(see next post for explanation of strikeouts, but note, I don’t recommend you do the struck out actions.)