For too long I’ve been committing the Systems Programmer cardinal sin — advocating proper backup strategies without doing so myself. Apparently I’m not alone (but that doesn’t make it right, of course). Having read about this things called Bacula, I decided to do something about my backup un-preparedness. Now, not without some pain, I have a working Bacula setup across three machines (Gentoo Linux, SUSE Linux, and Mac OS X) with more on the way.
Bacula is quite a sophisticated distributed backup system. It differs from others like AMANDA in that it uses an SQL database as a backend to provide a catalog service. It also provides better capability in dealing with backup devices across a number of machines. It natively handles Windows machines (apparently, I’ve not tried this myself), ahich AMANDA could not last time I looked.
My only gripe so far is a lack of a troubleshooting guide — but more on that later.
As I said, I’ve got a three machine Bacula configuration. I have my Gentoo Linux main server that provides Director, Storage and File services. My SUSE Linux bastion/PBX provides Storage and File, while the Mac OS X system just provides File service. The idea is that files from the SUSE and Mac OS X boxes are backed up to the Gentoo box, and the Gentoo box is backed up to the SUSE box. At regular intervals I’ll copy the Bacula volumes to a fourth machine and archive them to DVD. Good plan — or so I thought.
Installing Bacula was fairly easy. Gentoo provides a Bacula ebuild in the portage tree, so it was just an emerge away (even on AMD64). For Mac OS X, Bacula is source-distributed via Fink. SUSE does not yet provide Bacula, but the Bacula people themselves provide RPMs for popular distros on their Sourceforge download page.
So I emerged, finked and RPMed. I configured, which involved some cutting and pasting of obscure looking password strings. I was all set to go. Backing up to the Storage service on the Gentoo box went fine, but for some reason backing up to the SUSE machine failed every time. I configured, re-configured, and configured again. Every time, the Storage service complained that there was no appendable volume available, and that I have to issue the ‘label’ command to make one — which I did, to be greeted by the same message! Frustrated, I went to bed.
Next morning, I rechecked the configs (thinking that a clear head might show a previously-undetected error) and tried again. Same. Then a thought occurred to me that I should check the versions of the Bacula code I had installed on the machines. I discovered that the version on the Gentoo box (the machine that was running as Director) was an earlier level than the SUSE box. Since I’ve yet to work out how to make my own ebuilds for Gentoo and an earlier, matching, RPM for SUSE was available for download, I regressed the SUSE level to the same as the Gentoo box. With the configs unchanged, it worked first time!
After that it was easy to extend the backup to the Mac OS X machine — which, by the way, is an earlier version of Bacula still. Seems that the Director doesn’t mind talking to servers that are older than itself, it just can’t talk to something more recent.
So, a hint that I’m going to feed back to the Bacula community: DON’T try and use an older Director with recent Storage server! Corollary: if you’re going to upgrade your Bacula code, upgrade the Director box first!
Anyway, I like it — it’s fast, and it seems to do the job. I think it’s missing a bit in the user-interface department, though. I really liked AMANDA’s FTP-style restoration interface — you could almost give that to ‘end-users’ and let them run their own restores. Bacula’s interface is quite unforgiving, with not much by way if GIGO-trapping (I managed to feed a bogus SQL query to the database, by entering incorrect data). Still, it does the job, and that makes it better by far than what I had before. Bacula gets my highest rating: “Worth more than I paid for it”.