Getting bacula working
I spent probably 6 hours today trying to get Bacula working fully. I’d never tried it, but have been thinking about trying to implement a “real” backup system for some time. By “real”, I mean, something that can back up the most important bits of my two Macs, my remote webserver, and even bits of the RAID5 array that are “super critical”, to a separate harddrive, handle incrementals, and not involve lots of hackery on the clients. Bacula does seem to fit the bill, and I picked up a 400G eSATA drive to add to the server last week for about $100 to be the backup media (tapes? we don’t need no stinkin’ tapes!)
The setup on the Ubuntu server was actually pretty straightforward: install the packages via Synaptic, read some docs, twiddle with a ton of config files. Getting the first Mac client onboard though… that’s a different story. I couldn’t find precompiled binaries for OSX, and was suggested to use fink. Well, my fink install is ancient, and so that was a blow-it-out-and-reinstall move first. Then, of course, the latest fink isn’t happy with the version of GCC from my even more ancient version of Xcode. OK, a 900M (!) download and while to install that later, and at least I can get packages. Oh, but bacula is in “unstable” of course, which means fink is slower, and wants to compile absolutely everything from source. And somehow it triggered some dependencies that confused it–lynx wouldn’t build through the dependency graph, but would if I did it manually. Then, about a zillion gnome-related packages got pulled in (why?!). Several hours of compilations later, I actually got a working bacula (client-side) binary. Whee.
I manually started the daemon and configured things (several times until it was right) and I could actually start backup jobs from the server, of the Mac. (Much fiddling with the config files on the server ensued to actually get the data to be saved by the storage daemon, however.) But finally, it was all working! Now, I just needed to figure out how to start up the daemon automatically when the Mac starts up. Hmm… I know they don’t use rc scripts etc anymore… and apparently after some Yahoo searches, I find that on 10.4 there’s an even newer init-like thing, called launchd. Reading the intro, I was impressed–great stuff there! But now, how do I actually get bacula started by this thing?!
A few articles later, I had cobbled up the following file (I gave up on the “on demand” style launchd config: it seems doable but more ambitious than I felt like by then):
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
this got dropped into /Library/LaunchDaemons/bacula_client.plist, and I tested it by starting up launchctl in interactive mode and starting it:
sudo launchctl
launchd% load /Library/LaunchDaemons/bacula_client.plist
launchd% start bacula_client
and hey, what do you know, it actually started it (I did a ps -auxww | grep bacula before/after to ensure it wasn’t, and then was running), and then telnetted to port 9102 to make sure it was listening. Yay!
OK, next up: the Intel Macbook, and the remote linux box… updates when I’ve got that all done!
Lingon is a nice interface to managing launchd scripts.
I wanna love you snoop dog ft akon mp3….
Dog love. Personalized i love my dog stocking. Love life back dog falling. I love my dog t shirts….