This is a modern interpretation of some work I did some time ago with version 2.6.1. I’m just now working with 3.3.1 and documenting as I work so you may find that it’s not complete today if I get interrupted.
Jay – 27 July 2011.
IN A NUTSHELL
- Install the OS
- Patch the OS
- Load AMANDA Server Software
- Configure AMANDA
- Verify the Install
PREREQUISITES
We will need a system with gigabit interfaces, a large (1TB) drive space to act as virtual tapes, USB 2.0 capable ports and at least 2GB of RAM. While the backup server does not strictly need to be a high powered server it doesn’t hurt to give it some guts as the remote servers are often not powerful enough to do the compression/encryption of the data before transmission. A powerful backup server can easily handle task of building tar.gz files.
STEP-BY-STEP
These are the steps mentioned above and while you may want to vary from them I would not recommend skipping steps like “Patch the OS” as this is the sort of thing that can come back and bit you. Patching can take some time, but don’t skip this step. For the most part patching is an unattended step so you can do other things.
### Install the OS ###
I would recommend using a CentOS install for this as there are RPMs available which will facilitate later steps. When building try to keep the install minimal You don’t need that much to make AMANDA work, however, you should setup a few things:
- Operate on the CLI (init 3) rather then with a GUI. Just change the /etc/inittab so that the first uncommented line is id:3:initdefault: instead of id:5:initdefault:
- Firewall with 10080-10083 tcp/udp open. – Let me know if you need firewall settings.
- NO SELINUX – Unless you want to help me define these?
### Patch the OS ###
Do not skip this step. Even though it may take an hour to load the updates it it well worth the time. Running on unpatched code is just begging for a weird, time consuming problem later in this process. While this is happening you can work on the path statement below and also cleaning up the start up files.
# Load Updates
yum -y upgrade
reboot
While you are waiting for yum to finish you can work on a few other things as well.
# Path Changes
for d in /usr/local/bin /usr/local/sbin
do
case :$PATH: in
*:$d:*) : ;;
*) PATH=$d:$PATH ;;
esac
done
# Turn off extraneous processes (NB: there are plenty of new processes in RHEL6)
chkconfig autofs off
chkconfig cups off
chkconfig ip6tables off
chkconfig bluetooth off
### Load AMANDA Server Software ###
Grab the latest Amanda software from the RPM repository here and install it. Don’t be too worried about the fact that the version don’t match. Assuming the config file doesn’t change the location of the binaries… which we double-check later… there should not be a problem. Your only issue is you may be missing a feature that makes your AMANDA experience “better”:
http://www.zmanda.com/download-amanda.php
Something like this:
mkdir -pv ~/addon_software; cd ~/addon_software
wget http://www.zmanda.com/downloads/community/Amanda/3.3.0/Redhat_Enterprise_4.0/amanda-backup_server-3.3.0-1.rhel4.x86_64.rpm
wget http://www.zmanda.com/downloads/community/Amanda/3.3.0/Redhat_Enterprise_5.0/amanda-backup_client-3.3.0-1.rhel5.x86_64.rpm
wget http://www.zmanda.com/downloads/community/Amanda/3.3.0/Redhat_Enterprise_4.0/amanda-backup_client-3.3.0-1.rhel4.i386.rpm
yum localinstall --nogpgcheck amanda-backup_server*.rpm
# Check for errors
cat /var/log/amanda/install.err
# Set the amandabackup user password and unlock the account passwd amandabackup passwd -u amandabackup
# You may also want to get ntpd setup and running - not discussed here
# but having accurate time will most certainly help things along.
—–
### Amanda Admin Information
Because any newer version of the Amanda Server RPM could make changes to the usernames, groups and default directories you may want to check these with the amadmin command. This command will display what your current installation has set for users, groups, and directories. If there is a difference when you recover the amanda configuration files from the backups you will need to make the appropriate changes. I have included the expected responses in the comment lines:
# Amanda User - amandabackup
/usr/sbin/amadmin xx version | grep CLIENT_LOGIN
# Amanda Configuration Directory - /etc/amanda /usr/sbin/amadmin xx version | grep CONFIG_DIR
# Amanda Debug Log Dir - /tmp/amanda /usr/sbin/amadmin xx version | grep AMANDA_DBGDIR
# Amanda Executables - /var/lib/amanda /usr/sbin/amadmin xx version | grep libexecdir
# Amanda GNUTAR Lists - /var/lib/amanda/gnutar-lists /usr/sbin/amadmin xx version | grep listed_incr_dir
# Create the Holding Disk
You may want place your holding disk on a high-speed drive that is separated from the OS drive. This will speed things up a bit.
# Setup a Holding Disk. Why? Well if you have tapes that are slower
# than your hard drive a holding disk will grab the data faster. Also,
# holdingdisks will continue to grab incremental backups if you fail to
# change the tapes. Kind of a cool thing that.
#
# For this specific install I have a HUGE 12TB array that I can use.
# Gadzooks! I called it /storage
mkdir -pv /storage/holdingdiskmkdir -pv /storage/vtape chown -R amandabackup:disk /storage/holdingdisk /storage/vtape
# Setup the amanda permissions in the "secret file" # it's really not a secret, but lots of people forget this step. If # you add in all the servers and give them permissions to interact with # amanda
vi /var/lib/amanda/.amandahosts
servername.domain.com root amandabackup amandad amindexd amidxtaped servername.domain.com amandad amidxtaped
# This gives two different sets of permission. One for the root user
# and the other for the amanda daemon.
# Setup the /etc/amanda/amanda-client.conf with a valid tape device # in my case tapedev "file:/storage/vtape" # your tape device
# Build your tapes
Note that your backups will appear in one or more of the slots which represent both the full and the incremental backups located inside /storage/vtape. You’ll want to create all the tapes. I believe there is a nice clean way to create these labels. but you can also us this lovely DO LOOP:
cd /storage/vtapefor ((i=1; $i<=15; i++)); do mkdir slot$i; done
for ((i=1; $i<=15; i++)); do /usr/sbin/amlabel daily daily-$i slot $i; done
I had some difficulty here where even though I labeled my tapes I was getting messages about ‘unlabeled volume’ on all my tapes. So I ended up setting the permissions so that amandabackup:disk owned the vtapes/slots and then ran things as amandabackup Suddenly the results of my “amtape daily show” where no longer “unlabeled volume” but label daily-nn.
# Reset the tapes
amtape daily reset
#### Configuration #####
Skipped for now, please contact me and i’ll share my config and any of the intricacies that I have found over the years.
Setup Crontab
# Amanda check and dump
0 16 * * 1-7 /usr/sbin/amcheck -m daily
05 21 * * 1-7 /usr/sbin/amdump daily
0 8 * * * find /etc/amanda/daily/log.20* -type f -mtime +25 -exec rm {} \;
.
#### Test Amanda #####
Login as amandabackup and run amcheck daily. This will generate some errors with specific messages about changes you need to make to the .amandahost files of your clients.
### Other Tips ####
yum localinstall –nogpgcheck pigz-2.1.6-1.el5.rf.x86_64.rpm
amservice engineer.serverdomain.com bsdtcp noop < /dev/null
m