Warning Livedoc is no longer being updated and will be deprecated shortly. Please refer to https://documentation.tjhsst.edu.

Difference between revisions of "AMANDA"

From Livedoc - The Documentation Repository
Jump to: navigation, search
m (Robot: Adding Category:Obsolete)
m (Robot: Changing Category:Obsolete)
Line 42: Line 42:
* [http://www.amanda.org/docs/using.html#configuring The useful section of the AMANDA docs]
* [http://www.amanda.org/docs/using.html#configuring The useful section of the AMANDA docs]
[[Category:Obsolete Page]]

Latest revision as of 23:05, 27 January 2008


AMANDA, or the Advanced Maryland Automatic Network Disk Archiver is a backup system to allow for several machines to back up information to the same device (as in, a tape device) by sending their data to a server connected to that device. AMANDA is currently being used on emperor to back up non-AFS data (mostly mail data) to the Exabyte EXB-480 Tape Drive.

Note that to manually run many commands, such as amcheck or amlabel, AMANDA requires that you run as the backup user. So, just 'su - backup' before doing AMANDA stuff like that.


Our main configuration is called DailySet1 (mostly because that's the default), so the main configuration file is /etc/amanda/DailySet1/amanda.conf on emperor. Most of the directives are well-commented, so most of them will not be duplicated here.

"runtapes" is set to 2, since mail data is getting quite large, and may need more than one tape. The tape changer we use is chg-zd-mtx, so see that page for documentation on chg-zd-mtx configuration. The holding disk directory is /var/amanda/holding/, which is its own partition. The partition is almost 100G, so backups should run pretty smoothly, even if they become rather large.


The list of "disks" to backup is located in /etc/amanda/DailySet1/disklist. These are actually paths, since we only use the "tar" method of backing up data (thus all of the dumptypes end in "tar"), as opposed to "dump", since "dump" has repeated warnings on AMANDA website about not being very reliable on Linux. If we used "dump", then it would need an actual disk device to be specified, which is why that field is called a "disk". In the disklist, the host and "disk" (or path) are specified, in addition to the dumptype. Our normal dumptypes are "comp-tar", "comp-low-tar", and "comp-high-tar" for compressed dumptypes. (For uncompressed ones, just remove the "comp-" prefix.) The "low" and "high" mean that a dump may be passed over if space is tight, and will always be dumped if possible, respectively. Use "low" on paths that rarely change (i.e. configuration) and "high" on rapidly changing things, such as user data. Right now we actually just use "comp-tar" (for "medium" priority) for rapidly-changing data, since we only really require two levels of priority right now.


/etc/amandahosts needs to have every "client" host (that is, a host that has data we want to backup) name in it; just follow the format in it. This permits these hosts to connect, so they will not be able to be backed up without an entry. In addition, on each client host, /etc/amandahosts needs to contain (and probably should only contain) the line:

 emperor.tjhsst.edu backup

As that lets the backup host (in this case, emperor) connect to the client to request data. Pretty much everything else is set up when you install the "amanda-client" Debian package, though.

Restoring Data

There are two main programs to use when restoring AMANDA information from tape: amrecover and amrestore. amrecover is a neat interactive program which allows you to traverse the directory tree in a backup and list files, as well as changing what date/tape/etc you want to be using. amrestore is used to pull backup images directly (tarballs when using gnutar, or disk images themselves when using filesystem backup utilities). amrecover is easy enough to use, and should be fine for most cases. See the AMANDA wiki for more information.

If the AMANDA database is lost, backup images can be recovered manually using dd. Just use dd to read data from a tape, skipping over the first 32 kbytes (the AMANDA header is the first 32 kbytes). For example, run the following commands to get the tarball from a tape without AMANDA:

 # mt -f /dev/st0 rewind
 # dd if=/dev/st0 bs=32k count=1 | head # To see what data is on the tape
 # dd if=/dev/st0 of=backup_image.tar.gz bs=32k skip=1
 # tar xvfz backup_image.tar.gz /restore/path/foo/

Or something to that effect. See the AMANDA wiki for more information.

Common Problems

  • If you get an "Input/output error" (such as, with amcheck), check /var/log/syslog. If you see the message st3: Incorrect block size (or for whichever tape device instead of st3) around the current time, then set the block size to 0 (variable block size) with mt:
 # mt -f /dev/nst3 setblk 0
 # mt -f /dev/nst3 defblksize 0

Which should make it work with AMANDA. (Always run amcheck again to make sure.)

External Links