.\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "AMANDA" 8 "" "" "" .SH NAME amanda \- Advanced Maryland Automatic Network Disk Archiver .SH "SYNOPSIS" .ad l .hy 0 .HP 8 \fBamadmin\fR \fIconfig\fR \fIcommand\fR [\fIoptions\fR] .ad .hy .ad l .hy 0 .HP 8 \fBamcheck\fR [\fIoptions\fR] \fIconfig\fR .ad .hy .ad l .hy 0 .HP 10 \fBamcheckdb\fR \fIconfig\fR .ad .hy .ad l .hy 0 .HP 10 \fBamcleanup\fR \fIconfig\fR .ad .hy .ad l .hy 0 .HP 5 \fBamdd\fR [\fIoptions\fR] .ad .hy .ad l .hy 0 .HP 7 \fBamdump\fR \fIconfig\fR .ad .hy .ad l .hy 0 .HP 8 \fBamflush\fR [\-f] \fIconfig\fR .ad .hy .ad l .hy 0 .HP 10 \fBamgetconf\fR [\fIconfig\fR] \fIparameter\fR .ad .hy .ad l .hy 0 .HP 8 \fBamlabel\fR \fIconfig\fR \fIlabel\fR [\fIslot\fR\ \fIslot\fR] .ad .hy .ad l .hy 0 .HP 5 \fBammt\fR [\fIoptions\fR] .ad .hy .ad l .hy 0 .HP 11 \fBamoverview\fR \fIconfig\fR [\fIoptions\fR] .ad .hy .ad l .hy 0 .HP 7 \fBamplot\fR [\fIoptions\fR] \fIamdump\-files\fR .ad .hy .ad l .hy 0 .HP 10 \fBamrecover\fR [\fIconfig\fR] [\fIoptions\fR] .ad .hy .ad l .hy 0 .HP 9 \fBamreport\fR [\fIconfig\fR] [\fIoptions\fR] .ad .hy .ad l .hy 0 .HP 10 \fBamrestore\fR [\fIoptions\fR] \fItapedevice\fR [\fIhostname\fR\ [\fIdiskname\fR]] .ad .hy .ad l .hy 0 .HP 9 \fBamrmtape\fR [\fIoptions\fR] \fIconfig\fR \fIlabel\fR .ad .hy .ad l .hy 0 .HP 9 \fBamstatus\fR \fIconfig\fR [\fIoptions\fR] .ad .hy .ad l .hy 0 .HP 7 \fBamtape\fR \fIconfig\fR \fIcommand\fR [\fIoptions\fR] .ad .hy .ad l .hy 0 .HP 11 \fBamtapetype\fR [\fIoptions\fR] .ad .hy .ad l .hy 0 .HP 6 \fBamtoc\fR [\fIoptions\fR] \fIlogfile\fR .ad .hy .ad l .hy 0 .HP 9 \fBamverify\fR \fIconfig\fR .ad .hy .ad l .hy 0 .HP 12 \fBamverifyrun\fR \fIconfig\fR .ad .hy .SH "DESCRIPTION" .PP \fBAMANDA\fR is the "Advanced Maryland Automatic Network Disk Archiver"\&. This manual page gives an overview of the \fBAMANDA\fR commands and configuration files for quick reference\&. .PP Here are all the \fBAMANDA\fR commands\&. Each one has its own manual page\&. See them for all the gory details\&. .TP \fBamdump\fR Take care of automatic \fBAMANDA\fR backups\&. This is normally executed by \fBcron\fR on a computer called the \fBtape server host\fR and requests backups of file systems located on \fBbackup\fR \fBclients\fR\&. \fBAmdump\fR backs up all disks in the \fBdisklist\fR file (discussed below) to tape or, if there is a problem, to a special \fBholding\fR \fBdisk\fR\&. After all backups are done, \fBamdump\fR sends mail reporting failures and successes\&. .TP \fBamflush\fR Flush backups from the holding disk to tape\&. \fBAmflush\fR is used after \fBamdump\fR has reported it could not write backups to tape for some reason\&. When this happens, backups stay in the holding disk\&. Run \fBamflush\fR after the tape problem is corrected to write backups from the holding disk to tape\&. .TP \fBamcleanup\fR Clean up after an interrupted \fBamdump\fR\&. This command is only needed if \fBamdump\fR was unable to complete for some reason, usually because the tape server host crashed while \fBamdump\fR was running\&. .TP \fBamrecover\fR Provides an interactive interface to browse the \fBAMANDA\fR index files (backup image catalogues) and select which tapes to recover files from\&. It can also run \fBamrestore\fR and a restore program (e\&.g\&. \fBtar\fR) to actually recover the files\&. .TP \fBamrestore\fR Read an \fBAMANDA\fR tape, searching for requested backups\&. \fBAmrestore\fR is suitable for everything from interactive restores of single files to a full restore of all partitions on a failed disk\&. .TP \fBamlabel\fR Write an \fBAMANDA\fR format label onto a tape\&. All \fBAMANDA\fR tapes must be labeled with \fBamlabel\fR\&. \fBAmdump\fR and \fBamflush\fR will not write to an unlabeled tape (see TAPE MANAGEMENT below)\&. .TP \fBamcheck\fR Verify the correct tape is mounted and all file systems on all backup client systems are ready to be backed up\&. Often run by \fBcron\fR before \fBamdump\fR to generate a mail warning that backups might fail unless corrective action is taken\&. .TP \fBamadmin\fR Take care of administrative tasks like finding out which tapes are needed to restore a filesystem, forcing hosts to do full backups of selected disks and looking at schedule balance information\&. .TP \fBamtape\fR Take care of tape changer control operations like loading particular tapes, ejecting tapes and scanning the tape storage slots\&. .TP \fBamverify\fR Check \fBAMANDA\fR backup tapes for errors\&. .TP \fBamrmtape\fR Delete a tape from the \fBAMANDA\fR databases\&. .TP \fBamstatus\fR Report the status of a running or completed \fBamdump\fR\&. .TP \fBamoverview\fR Display a chart of hosts and file systems backed up every run\&. .TP \fBamplot\fR Generate utilization plots of \fBAMANDA\fR runs for performance tuning\&. .TP \fBamreport\fR Generate an \fBAMANDA\fR summary E\-mail report\&. .TP \fBamtoc\fR Generate table of content files for \fBAMANDA\fR tapes\&. .TP \fBamcheckdb\fR Verify every tape \fBAMANDA\fR knows about is consistent in the database\&. .TP \fBamgetconf\fR Look up parameters in the \fBAMANDA\fR configuration file\&. .TP \fBamtapetype\fR Generate a tapetype definition\&. .SH "CONFIGURATION" .PP There are three user\-editable files that control the behavior of \fBAMANDA\fR\&. .PP The first is \fBamanda\&.conf\fR, the main configuration file\&. It contains parameters to customize \fBAMANDA\fR for the site\&. Refer to the \fBamanda\&.conf\fR(5), manpage for details on \fBAMANDA\fR configuration parameters\&. .PP Second is the \fBdisklist\fR file, which lists hosts and disk partitions to back up\&. .PP Third is the \fBtapelist\fR file, which lists tapes that are currently active\&. These files are described in more detail in the following sections\&. .PP All files are stored in individual configuration directories under \fI/usr/local/etc/amanda/\fR\&. A site will often have more than one configuration\&. For example, it might have a \fBnormal\fR configuration for everyday backups and an \fBarchive\fR configuration for infrequent full archival backups\&. The configuration files would be stored under directories \fI/usr/local/etc/amanda/normal/\fR and \fI/usr/local/etc/amanda/archive/\fR, respectively\&. Part of the job of an \fBAMANDA\fR administrator is to create, populate and maintain these directories\&. .PP All log and database files generated by \fBAMANDA\fR go in corresponding directories somewhere\&. The exact location is controlled by entries in \fBamanda\&.conf\fR\&. A typical location would be under \fI/var/adm/amanda\fR\&. For the above example, the files might go in \fI/var/adm/amanda/normal/\fR and \fI/var/adm/amanda/archive/\fR\&. .PP As log files are no longer needed (no longer contain relevant information), \fBAMANDA\fR cycles them out in various ways, depending on the type of file\&. .PP Detailed information about \fBamdump\fR runs are stored in files named \fBamdump\&.\fR\fBNN\fR where \fBNN\fR is a sequence number, with 1 being the most recent file\&. \fBAmdump\fR rotates these files each run, keeping roughly the last \fBtapecycle\fR (see below) worth of them\&. .PP The file used by \fBamreport\fR to generate the mail summary is named \fBlog\&.\fR\fBYYYYMMDD\&.NN\fR where \fBYYYYMMDD\fR is the datestamp of the start of the \fBamdump\fR run and \fBNN\fR is a sequence number started at 0\&. At the end of each \fBamdump\fR run, log files for runs whose tapes have been reused are renamed into a subdirectory of the main log directory (see the \fBlogdir\fR parameter below) named \fBoldlog\fR\&. It is up to the \fBAMANDA\fR administrator to remove them from this directory when desired\&. .PP Index (backup image catalogue) files older than the full dump matching the oldest backup image for a given client and disk are removed by \fBamdump\fR at the end of each run\&. .SH "DISKLIST FILE" .PP The \fBdisklist\fR file determines which disks will be backed up by \fBAMANDA\fR\&. The file usually contains one line per disk: .nf \fBhostname diskname\fR [\fBdiskdevice\fR] \fBdumptype\fR [\fBspindle\fR [\fBinterface\fR] ] .fi .PP All pairs [ \fBhostname diskname\fR ] must be unique\&. .PP Lines starting with # are ignored, as are blank lines\&. The fields have the following meanings: .TP \fBhostname\fR The name of the host to be backed up\&. If \fBdiskdevice\fR refers to a PC share, this is the host \fBAMANDA\fR will run the Samba \fBsmbclient\fR program on to back up the share\&. .TP \fBdiskname\fR The name of the disk (a label)\&. In most case, you set your \fBdiskname\fR to the \fBdiskdevice\fR and you don't set the \fBdiskdevice\&.\fR If you want multiple entries with the same \fBdiskdevice\fR, you must set a different \fBdiskname\fR for each entry\&. It's the \fBdiskname\fR that you use on the commandline for any \fBAMANDA\fR command\&. Look at the example/disklist file for example\&. .TP \fBdiskdevice\fR Default: same as diskname\&. The name of the disk device to be backed up\&. It may be a full device name, a device name without the \fI/dev/\fR prefix, e\&.g\&. \fBsd0a\fR, or a mount point such as \fI/usr\fR\&. It may also refer to a PC share by starting the name with two (forward) slashes, e\&.g\&. \fI//some\-pc/home\fR\&. In this case, the \fBprogram\fR option in the associated \fBdumptype\fR must be entered as \fBGNUTAR\fR\&. It is the combination of the double slash disk name and \fBprogram GNUTAR\fR in the \fBdumptype\fR that triggers the use of Samba\&. .TP \fBdumptype\fR Refers to a \fBdumptype\fR defined in the \fBamanda\&.conf\fR file\&. \fBDumptype\fRs specify backup related parameters, such as whether to compress the backups, whether to record backup results in \fI/etc/dumpdates\fR, the disk's relative priority, etc\&. .TP \fBspindle\fR Default: \fB\-1\fR\&. A number used to balance backup load on a host\&. \fBAMANDA\fR will not run multiple backups at the same time on the same spindle, unless the spindle number is \-1, which means there is no spindle restriction\&. .TP \fBinterface\fR Default: \fBlocal\fR\&. The name of a network interface definition in the \fBamanda\&.conf\fR file, used to balance network load\&. .PP Instead of naming a \fBdumptype\fR, it is possible to define one in\-line, enclosing \fBdumptype\fR options within curly braces, one per line, just like a \fBdumptype\fR definition in \fBamanda\&.conf\fR\&. Since pre\-existing \fBdumptype\fRs are valid option names, this syntax may be used to customize \fBdumptype\fRs for particular disks\&. .PP A line break \fBmust\fR follow the left curly bracket\&. .PP For instance, if a \fBdumptype\fR named \fBnormal\fR is used for most disks, but use of the holding disk needs to be disabled for the file system that holds it, this would work instead of defining a new dumptype: .nf \fBhostname diskname\fR [ \fBdiskdevice\fR ] { normal holdingdisk no } [ \fBspindle\fR [ \fBinterface\fR ] ] .fi .SH "TAPE MANAGEMENT" .PP The \fBtapelist\fR file contains the list of tapes in active use\&. This file is maintained entirely by \fBAMANDA\fR and should not be created or edited during normal operation\&. It contains lines of the form: .PP .nf YYYYMMDD label flags .fi .PP Where \fBYYYYMMDD\fR is the date the tape was written, \fBlabel\fR is a label for the tape as written by \fBamlabel\fR and \fBflags\fR tell \fBAMANDA\fR whether the tape may be reused, etc (see the \fBreuse\fR options of \fBamadmin\fR)\&. .PP \fBAmdump\fR and \fBamflush\fR will refuse to write to an unlabeled tape, or to a labeled tape that is considered active\&. There must be more tapes in active rotation (see the \fBtapecycle\fR option) than there are runs in the backup cycle (see the \fBdumpcycle\fR option) to prevent overwriting a backup image that would be needed to do a full recovery\&. .SH "OUTPUT DRIVERS" .PP The normal value for the \fBtapedev\fR parameter, or for what a tape changer returns, is a full path name to a non\-rewinding tape device, such as \fI/dev/nst0\fR or \fI/dev/rmt/0mn\fR or \fI/dev/nst0\&.1\fR or whatever conventions the operating system uses\&. \fBAMANDA\fR provides additional application level drivers that support non\-traditional tape\-simulations or features\&. To access a specific output driver, set \fBtapedev\fR (or configure your changer to return) a string of the form \fBdriver\fR:\fBdriver\-info\fR where \fBdriver\fR is one of the supported drivers and \fBdriver\-info\fR is optional additional information needed by the driver\&. .PP The supported drivers are: .TP \fBtape\fR This is the default driver\&. The \fBdriver\-info\fR is the tape device name\&. Entering .nf tapedev /dev/rmt/0mn .fi is really a short hand for .nf tapedev tape:/dev/rmt/0mn .fi \&. .TP \fBnull\fR This driver throws away anything written to it and returns EOF for any reads except a special case is made for reading a label, in which case a "fake" value is returned that \fBAMANDA\fR checks for and allows through regardless of what you have set in \fBlabelstr\fR\&. The \fBdriver\-info\fR field is not used and may be left blank: .nf tapedev null: .fi The \fBlength\fR value from the associated \fBtapetype\fR is used to limit the amount of data written\&. When the limit is reached, the driver will simulate end of tape\&. .RS .Sh "Note" This driver should only be used for debugging and testing, and probably only with the \fBrecord\fR option set to \fBno\fR\&. .RE .TP \fBrait\fR \fBR\fRedundant \fBA\fRrray of \fBI\fRnexpensive (?) \fBT\fRapes\&. Reads and writes tapes mounted on multiple drives by spreading the data across N\-1 drives and using the last drive for a checksum\&. See docs/RAIT for more information\&. The \fBdriver\-info\fR field describes the devices to use\&. Curly braces indicate multiple replacements in the string\&. For instance: .nf tapedev rait:/dev/rmt/tps0d{4,5,6}n .fi would use the following devices: \fI/dev/rmt/tps0d4n\fR \fI/dev/rmt/tps0d5n\fR \fI/dev/rmt/tps0d6n\fR .TP \fBfile\fR This driver emulates a tape device with a set of files in a directory\&. The \fBdriver\-info\fR field must be the name of an existing directory\&. The driver will test for a subdirectory of that named \fBdata\fR and return \fBoffline\fR until it is present\&. When present, the driver uses two files in the \fBdata\fR subdirectory for each tape file\&. One contains the actual data\&. The other contains record length information\&. The driver uses a file named \fBstatus\fR in the \fBfile\fR device directory to hold driver status information, such as tape position\&. If not present, the driver will create it as though the device is rewound\&. The \fBlength\fR value from the associated \fBtapetype\fR is used to limit the amount of data written\&. When the limit is reached, the driver will simulate end of tape\&. One way to use this driver with a real device such as a CD\-writer is to create a directory for the \fBfile\fR device and one or more other directories for the actual data\&. Create a symlink named \fBdata\fR in the \fBfile\fR directory to one of the data directories\&. Set the \fBtapetype\fR length to whatever the medium will hold\&. When \fBAMANDA\fR fills the \fBfile\fR device, remove the symlink and (optionally) create a new symlink to another data area\&. Use a CD writer software package to burn the image from the first data area\&. To read the CD, mount it and create the \fBdata\fR symlink in the \fBfile\fR device directory\&. .SH "AUTHORIZATION" .PP \fBAMANDA\fR processes on the tape server host run as the \fBdumpuser\fR user listed in \fBamanda\&.conf\fR\&. When they connect to a backup client, they do so with an \fBAMANDA\fR\-specific protocol\&. They do not, for instance, use \fBrsh\fR or \fBssh\fR directly\&. .PP On the client side, the \fBamandad\fR daemon validates the connection using one of several methods, depending on how it was compiled and on options it is passed: .TP \&.rhosts Even though \fBAMANDA\fR does not use \fBrsh\fR, it can use \&.rhosts\-style authentication and a \&.rhosts file\&. .TP \&.amandahosts This is essentially the same as \&.rhosts authentication except a different file, with almost the same format, is used\&. This is the default mechanism built into \fBAMANDA\fR\&. The format of the \fI\&.amandahosts\fR file is: \fBhostname\fR [ \fBusername\fR ] If \fBusername\fR is ommitted, it defaults to the user running \fBamandad\fR, i\&.e\&. the user listed in the \fBinetd\fR or \fBxinetd\fR configuration file\&. .TP Kerberos \fBAMANDA\fR may use the Kerberos authentication system\&. Further information is in the \fBdocs/KERBEROS\fR file that comes with an \fBAMANDA\fR distribution\&. For Samba access, \fBAMANDA\fR needs a file on the Samba server (which may or may not also be the tape server) named \fI/etc/amandapass\fR with share names, (clear text) passwords and (optional) domain names, in that order, one per line, whitespace separated\&. By default, the user used to connect to the PC is the same for all PC's and is compiled into \fBAMANDA\fR\&. It may be changed on a host by host basis by listing it first in the password field followed by a percent sign and then the password\&. For instance: .nf //some\-pc/home normalpw //another\-pc/disk otheruser%otherpw.fi With clear text passwords, this file should obviously be tightly protected\&. It only needs to be readable by the \fBAMANDA\fR\-user on the Samba server\&. You can find further information in the \fBdocs/SAMBA\fR file that comes with an \fBAMANDA\fR distribution\&. .SH "HOST & DISK EXPRESSION" .PP All host and disk arguments to programs are special expressions\&. The command applies to all disks that match your arguments\&. This section describes the matcher\&. .PP The matcher matches by word, each word is a glob expression, words are separated by the separator '\&.' for host and '/' for disk\&. You can anchor the expression at left with a '^'\&. You can anchor the expression at right with a '$'\&. The matcher is case insensitive for host but is case sensitive for disk\&. A match succeeds if all words in your expression match contiguous words in the host or disk\&. \&. word separator for a host/ word separator for a disk^ anchor at left$ anchor at right? match exactly one character except the separator* match zero or more characters except the separator**match zero or more characters including the separator .PP Some examples: EXPRESSIONWILL MATCH WILL NOT MATCHhosta hosta hostb hoSTA\&.dOMAIna\&.ORG  foo\&.hosta\&.org host host hostahost? hosta host hostb ho*na hoina ho\&.aina\&.orgho**na hoina  ho\&.aina\&.org ^hosta hosta foo\&.hosta\&.orgsda* /dev/sda1  /dev/sda12 /opt/ opt (disk) opt (host)\&.opt\&. opt (host) opt (disk)/ / any other disk/usr /usr  /usr/opt /usr$ /usr /usr/opt .PP .SH "DATESTAMP EXPRESSION" .PP A \fBdatestamp\fR expression is a range expression where we only match the prefix\&. Leading ^ is removed\&. Trailing $ forces an exact match\&. 20001212\-14match all dates beginning with 20001212, 20001213 or 2000121420001212\-4same as previous20001212\-24match all dates between 20001212 and 200012242000121match all dates that start with 2000121 (20001210\-20001219)2match all dates that start with 2 (20000101\-29991231)2000\-10match all dates between 20000101\-20101231200010$match only 200010 .PP .SH "AUTHOR" .PP James da Silva, : Original text .PP Stefan G\&. Weichinger, , maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion, major update .SH "SEE ALSO" .PP \fBamadmin\fR(8), \fBamanda\&.conf\fR(5), \fBamcheck\fR(8), \fBamcheckdb\fR(8), \fBamcleanup\fR(8), \fBamdd\fR(8), \fBamdump\fR(8), \fBamflush\fR(8), \fBamgetconf\fR(8), \fBamlabel\fR(8), \fBammt\fR(8), \fBamoverview\fR(8), \fBamplot\fR(8), \fBamrecover\fR(8), \fBamreport\fR(8), \fBamrestore\fR(8), \fBamrmtape\fR(8), \fBamstatus\fR(8), \fBamtape\fR(8), \fBamtapetype\fR(8), \fBamtoc\fR(8), \fBamverify\fR(8), \fBamverifyrun\fR(8)