Amanda is a network backup scheduler that uses native utilities to perform backups for a number of different operating systems. A long time ago, a design decision was made to not require any configuration be done on the clients, and as a result, some settings had to be compiled into the client binaries.
This presents an interesting problem for those who package binaries for Amanda (e.g. just about every Linux distribution); they can't know settings at compile time, so some assumptions must be made. The biggest problem with that is using localhost as the server names. (See the Top Ten List for details on why this is a problem).
I know that it seems to be a pretty dismal picture. Most people on the amanda list will tell you to build from source. But then you lose all of the benefits of your package management system. The solution? Do both. The remainder of this page is information on how to build your own amanda RPMs such that your settings are reflected in your local setup. I've tried to make it as easy as possible, but if you have problems, feel free to contact me. Let's get started, shall we?
Now that you know the theory, here's some instructions. First, get the amanda-2.4.5p1-2.mrh1.src.rpm above.
At this point, if you run RHEL4 or later, skip to the next section. If you are still running RHEL3, then you will want to download and install the autoconf259 and libtool packages above. I recompiled them into their respective binary RPMs, however they are not GPG signed. I would advise you rebuild the src.rpm and sign it with your own GPG key. After autoconf259 and libtool is installed, you will want to download the amanda-EL3.spec file and put it in your SPECS directory (e.g. /usr/src/redhat/SPECS).
If you only wish to modify the configname, or tape and index servers, all you have to do is run the following command:
$ rpmbuild --rebuild --define "defconfig Dailies" --define "tapeserver fqdn.com" amanda-2.4.5p1-2.mrh1.src.rpm
Modifying the --defines for your needs, of course.
If you wish to make more intrusive changes, after you have downloaded the src.rpm instead of rebuilding, run the command:
$ rpm -i amanda-2.4.5p1-2.mrh1.src.rpm
This command will break the SRPM into its parts and place them in your rpm _topdir. If you are root, that usually means /usr/src/redhat/, but if you are not root (and you really should never build rpms as root...), it will be wherever you defined %_topdir to point to in your .rpmmacros file.
Now you can make some changes. Edit the amanda-EL4.spec file (or amanda-EL3.spec if you are using RHEL3) and change the 3 variables at the top to reflect the name of your default configuration, tapeserver and indexserver. By default, the tapeserver is the same as the indexserver. If you feel any more changes are necessary, feel free to make them. One possibility is if you use a user other than "amanda" to do your backups, which may very well be the case if you are using a Debian server and Red Hat clients. In this case, you want to change it to the user "backup". Simply edit the .spec file and in the %configure section, change the "--with-user=amanda" line to "--with-user=backup". I would also recommend changing the Release: string to reflect your environment.
After all your changes are made, you can rebuild the amanda RPMs by executing:
$ rpmbuild -ba amanda-EL?.spec
Give it a few minutes, and you should get some nice, shiny amanda RPMs built for your environment.
I will continue feeding changes and suggestions up the chain to Red Hat, and hopefully the community can come to a good concensus about how to handle some of these pre-packaging problems.
Matt Hyclak
Ohio University Department of Mathematics
hyclak@math.ohiou.edu