Build a Basic Configuration
Let's jump right in. Presumably you have Amanda-3.2.0 or higher installed already!
Contents
Setup
First, make some directories. You'll need to know your Amanda user, probably "amandabackup" or "amanda" or "backup", depending on how you installed Amanda. We'll use "amandabackup" here to avoid ambiguity. As root:
Use your Amanda username instead of 'amandabackup', if necessary. As the Amanda user:
All of the data will be under /amanda to stress that there is no system-specific place to put them. Of course, in the end, you can put them wherever you'd like!
Now, add an amanda.conf(5) file at /etc/amanda/MyConfig/amanda.conf with the following contents. Note that you should edit dumpuser appropriately if your Amanda user has another name.
Next, add a disklist(5) with a single disk list entry (DLE). This is /etc/amanda/MyConfig/disklist:
That's it.
Check
Amanda has a nice utility called amcheck(8) which can check a configuration for you. Running it on the test configuration should give something like the following. Note that almost all Amanda commands take the configuration name ("MyConfig" in this case) as the first argument.
Oh Noes!
If something's gone wrong already, it's time to seek help. See the "Getting Help" section of user documentation for pointers. Be sure to let folks know that you're working on "Getting Started with Amanda", so they know what to expect. A few common errors:
Using an older version of Amanda. Amanda came a long way from 2.4.x or even 2.5.x to 3.2.x, and the older versions are just downright cranky and hard to use. Upgrade.
Permissions problems. If you've had a few different installs of Amanda, you may have several Amanda users, and your directories may be owned by several users. Sadly, the various operating system distributions do not at all agree on how Amanda should be built or installed, so things can get a bit chaotic. If at all possible, start over from a clean slate, and only install one copy of Amanda!
Test Run
The moment of truth is near. The tool to run backups is amdump(8). It takes only the configuration name, and it doesn't print anything to the terminal. It should be run as the Amanda user.
how'd that go? Hard to tell from the terminal, although if it took a few seconds then you're probably in good shape. On the very next line, run
if you see something other than zero, then the backup failed. In either case, you can see a handy report of what happened with amreport(8):
of course, your numbers may be different, but this gives you a good idea of the total time and space used, broken down by tape and by DLE.
Automating
Nobody wants to have to remember to run the backups every night. That's why we have cron! Add lines like
to /etc/crontab. Again, depending on how you've installed Amanda, you may need to change /usr/sbin to something else. Use which amcheck on the command line to find out where your distro has put the Amanda tools.
Automation is no good if you never find out something is broken. Amcheck can email you for problems (that's the -m flag in the crontab), and amdump will happily email you a report every night. Just add a mailto configuration to your amanda.conf:
Recovering
Recovering files is important, but let's defer that to a later article - Recovering Files.
Last updated