KTH
User support, systemgruppen - nada
<homesearchdelfimacwinunix|softwarenadakth>

[Translation missing]


Related:
*Amanda på RedHat Linux
Installing Amanda on Linux systems. (160)
*To burn AFS homedirectory to CD
Information on how to burn AFS homedirectory to CD. Only in Swedish. (140)
*Retrospect - Backup for Client Computers
Description of the Retrospect backup system on Windows 2000. (124)
*Retrospect - backup for client computers
Description of the Retrospect backup system on Mac OS. (112)
*Retrospect - how to change tapekits
A step-by-step instruction on how to change backup tapekits on the Retrospect backup servers (backups for Mac). (100)
*Unix at Nada
Information about the Unix systems used at Nada. (92)
*Burning Unix-files to a CD
A short introduction on how to burn Unix-files to a CD (84)
*Tape history, Macintosh backups at Nada
Listings over tapekits that have been used for Retrospect backups at Nada. (80)
More...
saw

Amanda backup system at Nada

Amanda is a free client/server backup system. It has support for kerberos-IV for authorization, as well as regular BSD security.

Index


Operation

Commands

A short description of the most common commands and typical usage follows here. Also the things that differ from the man pages.

amcheck

amcheck checks for configuration and communication errors. It is typically run from cron each day and if any errors are encountered a mail is sent to the amanda address. When you are editing the configuration files you may want to test it manually, though and you do that with:
amcheck daily 
A -c switch can be added in before the configuration (daily) if you only want to check the clients. A -s switch can be used to check the server only. amcheck -s daily is commonly used to see which tape is loaded into the drive.

See also amcheck(8)

amadmin

This the amanda administration utility. It can be used to force 0 dumps for archiving etc.
The most common usage however, is to find the appropriate tapes to use in order to restore a partition.
amadmin daily find web
lists all available backups of the host web. Adding a partition lists only that partition. Machines in the kth.se domain requires full name with domain, Nada machines requires no domain (a bit silly). otherwise amadmin won't find anything.

See also amadmin(8)

Names of devices are presently a bit confused. I'm switching to mount points, but meanwhile you'll have to expect both.

amrestore

This is the utility by which you restore files from tape. cd to a place with lots of room first. Typical usage is:
amrestore -p /dev/rmt/0cn host partition | restore ivbf 2 -
if you want to restore files interactively, and
amrestore -p /dev/rmt/0cn host partition
or only host if you want to get all the backups from a certain host as dump-files.
Note that the tape device is /dev/rmt/0cn.

See also amrestore(8)

amdump

This is the command that actually performs the dumps. This is normally only issued from cron-tab on pacman.

See also amdump(8)

amlabel

A utility to label amanda tapes. The labels are VOLXX in the daily configuration, where XX are digits 01-29 presently. in /var/amanda.

Server configuration files are located in the /var/amanda/etc/amanda/ directories. The different subdirectories are the different configuration names, so the daily backup configuration is located in /var/amanda/etc/amanda/daily. The files are:

  • amanda.conf -- The configuration file which contains information on where holding disks are, dump-types, tape-types and so on. The options in the dump-type are specified in the comments. This file is under RCS version control.
  • disklist -- Contain a list of disks to be dumped and by which dump-type. This file is also under RCS version control.
  • tapelist/tapelist.yesterday -- These files are maintained by amanda itself and contains lists of the tapes used and when.
The server log files are located in subdirectories to /var/amanda/var/amanda/ in the same manner. There are three categories of files there:
  • log.* -- Brief info from the planner and final report of the success of the dumps.
  • amdump.* -- Detailed report of virtually everything. These files get pretty big.
  • curindex.* -- The little database keeping track of where which dump is, and when it was made.
You really don't want to loose these files.
You don't usually look at these files by themselves. Instead you use the amplot command to give a graphical view. This is very helpful when trying to balance the backup process and identifying bottlenecks.

There are also some system files that are affected. These are:

  • /etc/inetd.conf
  • /etc/services
  • /.klogin
Refer to the section Installation for details on what goes in these files.

Finally there are the entries in the crontab. They are listed here as well:

#
# amanda
#
10 23 * * */pkg/amanda/default/sh/backup.sh dump daily
10 13 * * */pkg/amanda/default/sh/backup.sh check daily
10 10 * * */pkg/amanda/default/sh/diskwatcher -m

How it works -- short description

Amanda is basically organized as client-server, where amandad is the client that is run from inetd on the client machines. When running amdump the planner connects to the clients, gather information of estimated dump-sizes and generates a schedule. The process which controls the entire dump-cycle (including the planner) is called the driver.
The driver forks out a dumper per dump which connects to amandad on the clients to perform the dump. It runs the appropriate dump-command and pipes the output across the network in 68KB blocks, forking out gzip and encryption in the pipe as specified in the disklist.
On the server side the dump is written to the holding disk if possible, otherwise directly to tape, encrypting if needed (but not unpacked if you use gzip).
When all the dumps are made a report is written and mailed.

Other sources of documentation

Man pages are available for all commands:
  • amanda.(8)
  • amadmin(8)
  • Adding tapes to the cycle

    Adding tapes to the cycle is an example of an administrative issue, you can add tapes anywhere in the tape-cycle but that is guaranteed to confuse people.
    1. Edit amanda.conf -- Edit the configuration file in the appropriate configuration directory, /var/amanda/etc/amanda/daily.
    2. label the tapes -- Use amlabel to label the tapes so that amanda will recognize them. This makes the backups safer and you won't overwrite wrong tapes.

    Quit some dump

    You usually don't want to interfere with amdump once you got it going, but if it's necessary you can kill a particular dumper process without harming the other dumps.

    Changing tapes

    The tapes are located in the backup safe and labeled VOLXX where XX are digits. Tapes are normally switched Monday. These are loaded into the DLT changer on pacman, and the tapes will be automatically switched after the nightly backups are done. So if fully loaded it will keep itself busy for a week. You have to load the first tape into the tape-writer manually.

    If wrong or no tape is loaded amcheck will send a mail warning to the amanda mail address. This is typically the case when that week is over. Somebody has better switch the tapes then.
    When the last tape in the cycle is used, the first one is loaded again. There are currently 21 tapes used, soon to be extended to 28.

    You can use the amcheck command manually to verify that the correct tape is loaded.

    If you have to replace tapes with new ones or add tapes to the tape-cycle, you should label them appropriately with amlabel.

    Notification

    Amanda sends mail reports with the results of the backup to the mail address amanda (option set in amanda.conf on the server). This is also where reports on any problems discovered by amcheck are sent.
    This address is then expanded in /etc/aliases.

    Problems

    Wrong tape/no tape

    If this happens amanda will try to backup as much as possible to holding disk using only incremental backups. You can then use the command amflush to flush the backups to the appropriate tape or a new tape.

    Some backups failed

    It sometimes happens that a particular backup fails. Most often because the client is to heavily loaded so the dumper stops on timeout. There is not much to do about this, but it's abnormal and if it happens several times on the same host you'll have to look at it.

    "mutual-authentication failed"

    As reported by amcheck. This means that kerberos authentication was unsuccessful. This is usually caused by either amanda.pacman@NADA.KTH.SE missing in the /.klogin file, or that the system clock is not in sync.

    "selfcheck request timed out. Host down?"

    This may either be just a heavily loaded client, the timeout on the check is pretty short. If it persists, it's usually hinting that the binaries are missing entirely, or that kamanda (or amanda) is missing from /etc/inetd.conf.

    "... -> NULL, mutual authentication failed

    (I can't quite remeber what it said.) Nowadays pacman is multi homed. This happens when the client doesn't have a /etc/krb.equiv with the servers interfaces.

    Installation

    The installation of amanda follows the pkg system and has it's own NADAINSTALL script. To install amanda on a new client simply login as root and issue the command:
    /afs/nada.kth.se/pkg/amanda/default/pkgINSTALL
    This will add the files locally in /pkg and add amanda to /etc/pkg.conf if it's not there. If this script is run on the host pacman, the intire package will be installed locally, otherwise only the client binaries, and symlinks will be set up to the rest.

    In /etc/services are the default amanda ports defined with:

    amanda          10080/udp
    kamanda         10081/udp
    In /etc/inetd.config is the setup for the launching of amandad:
    kamanda dgram udp wait root /pkg/amanda/default/libexec/amandad amandad -krb4
    Finally you need to allow the backup server access as root on the client by adding
    amanda.pacman@NADA.KTH.SE
    to /.klogin.

    Nada specific matters, names of devices and such

    • Backup server -- pacman.nada.kth.se
    • Amanda service key -- amanda.pacman@NADA.KTH.SE
    • Tape device on pacman -- /dev/rst4
    • Amanda package -- /pkg/amanda. The present release is 2.4.1p1 with kerberos additions.
    • Man pages -- /pkg/amanda/default/man
    • Server binaries, commands -- /pkg/amanda/default/bin
    • Server scripts -- /pkg/amanda/default/sbin
    • Client (server) binaries -- /pkg/amanda/default/libexec
    • Names for disk partitions -- Amanda can use either mount-points or disk device to dump volumes. Presently most partitions are listed by device, which is stupid. I'm changing this, and in the meantime there will be a mixture.

    Scripts

    Some utility scripts are available in /pkg/amanda/default/sh.

    Diskwatcher

    Diskwatcher is run from cron and looks for filesystems not currently backed up by Amanda. It is dependant on information in /misc/adm/diskinfo. The script compares the contents of the Amanda disklist with the information in diskinfo and siteinfo. Output is a mail to amanda@nada.kth.se with a list of such filesystems.

    A file /var/amanda/etc/amanda/ignored-disks is used to exclude filesystems from checking. It is a list of two tab-separated regular expressions, defining file systems that should be ignored during checking.

    Files, and what goes in them

    The software package is located in /pkg/amanda. The configuration files, log files and backup database is located in /var/amanda.

    Server configuration files are located in the /var/amanda/etc/amanda/ directories. The different subdirectories are the different configuration names, so the daily backup configuration is located in /var/amanda/etc/amanda/daily. The files are:

    • amanda.conf -- The configuration file which contains information on where holding disks are, dump-types, tape-types and so on. The options in the dump-type are specified in the comments. This file is under RCS version control.
    • disklist -- Contain a list of disks to be dumped and by which dump-type. This file is also under RCS version control.
    • tapelist/tapelist.yesterday -- These files are maintained by amanda itself and contains lists of the tapes used and when.
    The server log files are located in subdirectories to /var/amanda/var/amanda/ in the same manner. There are three categories of files there:
    • log.* -- Brief info from the planner and final report of the success of the dumps.
    • amdump.* -- Detailed report of virtually everything. These files get pretty big.
    • curindex.* -- The little database keeping track of where which dump is, and when it was made.
    You really don't want to loose these files.
    You don't usually look at these files by themselves. Instead you use the amplot command to give a graphical view. This is very helpful when trying to balance the backup process and identifying bottlenecks.

    There are also some system files that are affected. These are:

    • /etc/inetd.conf
    • /etc/services
    • /.klogin
    Refer to the section Installation for details on what goes in these files.

    Finally there are the entries in the crontab. They are listed here as well:

    #
    # amanda
    #
    10 23 * * */pkg/amanda/default/sh/backup.sh dump daily
    10 13 * * */pkg/amanda/default/sh/backup.sh check daily
    10 10 * * */pkg/amanda/default/sh/diskwatcher -m
    

    How it works -- short description

    Amanda is basically organized as client-server, where amandad is the client that is run from inetd on the client machines. When running amdump the planner connects to the clients, gather information of estimated dump-sizes and generates a schedule. The process which controls the entire dump-cycle (including the planner) is called the driver.
    The driver forks out a dumper per dump which connects to amandad on the clients to perform the dump. It runs the appropriate dump-command and pipes the output across the network in 68KB blocks, forking out gzip and encryption in the pipe as specified in the disklist.
    On the server side the dump is written to the holding disk if possible, otherwise directly to tape, encrypting if needed (but not unpacked if you use gzip).
    When all the dumps are made a report is written and mailed.

    Other sources of documentation

    Man pages are available for all commands: More information is available at these sites:

    2000-10-15, Systemgruppen at Nada <system@nada.kth.se>