.\" .de EX .if t .ft C .nf .. .de EE .fi .if t .ft .. .TH AMCHECK 8 .SH NAME amcheck \- run Amanda self\-checks .SH SYNOPSIS .B amcheck [ .B \-mwsclt ] [ .BI \-M address ] .I config [ .I host [ .I disk ]* ]* .SH DESCRIPTION .B Amcheck runs a number of self\-checks on both the Amanda tape server host and the Amanda client hosts. .LP On the tape server host, .B amcheck can go through the same tape checking used at the start of the nightly .B amdump run to verify the correct tape for the next run is mounted. .LP .B Amcheck can also do a self\-check on all client hosts to make sure each host is running and that permissions on filesystems to be backed up are correct. .LP You can specify many host/disk expressions, only disks that match an expression will be checked. All disk are checked if no expression are given. .LP See the .IR amanda (8) man page for more details about Amanda. .SH OPTIONS .TP .B \-s Run the tape server local and tape checks (same as .BR \-lt ). .TP .B \-c Run the client host checks. .TP .B \-l Run the local tests (e.g. permissions) on the server host. .TP .B \-t Run the tape tests on the server host. .TP .B \-w Enables a destructive check for write\-protection on the tape (which would otherwise cause the subsequent .B amdump to fail). If the tape is writable, this check causes all data after the tape label to be erased (actually depends on the device driver: there is no portable non\-destructive way to check for write\-protection). The check implies .B \-t and is only made if the tape is otherwise correct. .TP .B \-m Nothing is printed, but mail is sent if any errors are detected. The mail goes to the .B mailto address specified in the .I amanda.conf file or the .I address value if .B \-M is set. .TP .B \-a Like .B \-m but the mail is always sent. .TP .BI \-M address Mail the report to .I address instead of the .B mailto value from .IR amanda.conf . Implies .BR \-m . .LP The default is .BR \-cs . .SH EXAMPLES In this example, both the tape server and client tests are run. The results are displayed on standard output. .LP .RS .EX % amcheck @DEFAULT_CONFIG@ Amanda Tape Server Host Check ----------------------------- /amanda2/amanda/work: 911475 KB disk space available, that's plenty. NOTE: skipping tape-writable test. Tape VOL10 label ok. Server check took 34.966 seconds. Amanda Backup Client Hosts Check -------------------------------- WARNING: northstar: selfcheck request timed out. Host down? WARNING: drinkme: selfcheck request timed out. Host down? WARNING: scruffy: selfcheck request timed out. Host down? Client check: 136 hosts checked in 51.945 seconds, 3 problems found. (brought to you by Amanda 2.4.2) .EE .RE .LP In this example, if the line .B mailto csd-amanda is in .IR amanda.conf , mail will be sent to .B csd-amanda if the server check returns an error. .LP .RS .EX % amcheck \-s \-m @DEFAULT_CONFIG@ .EE .RE .SH MESSAGES .TP fatal slot \fIslot\fP: \fIerror message\fP (error) The tape changer detected some kind of fatal error while trying to load slot .IR slot . .TP slot \fIslot\fP: \fIerror message\fP (warning) The tape changer detected some kind of non-fatal error (e.g. an empty slot was detected) while trying to load slot .IR slot , or an error was detected trying to read the tape label. .TP slot \fIslot\fP: date \fIYYYYMMDD\fP label \fIlabel\fP (\fIresult\fP) (info) Tape .I label in slot .I slot was loaded and found to have been last written on .IR YYYYMMDD . If the tape is new, the date field will be an .IR X . The .I result may be one of: .RS .TP exact label match This is the expected tape. .TP no match This label does not match the .B labelstr pattern in .IR amanda.conf . Tape scanning will continue. .TP active tape This tape is still active and cannot be overwritten. Tape scanning will continue. .TP first labelstr match This tape is the first one that matches the .B labelstr pattern in .IR amanda.conf . Tape scanning will continue if necessary. .TP labelstr match This tape is the next one that matches the .B labelstr pattern in .IR amanda.conf . Tape scanning will continue. .RE .TP ERROR: cannot look up dump user "\fIuser\fP" (error) Dump user .I user from .I amanda.conf could not be found in the system password information. .TP ERROR: cannot look up my own uid (\fIuid\fP) (error) User id .I uid running .B amcheck could not be found in the system password information. .TP ERROR: running as user "\fIrunuser\fP" instead of "\fIdumpuser\fP" (error) .B Amcheck should be run as the dump user .I dumpuser from .I amanda.conf instead of .IR runuser . .TP ERROR: program dir \fIdirectory\fP: not accessible (error) The directory Amanda expects to find its auxiliary programs in, .IR directory , is not accessible. .TP ERROR: program \fIprogram\fP: does not exist (error) Program .I program needed on the tape server could not be found. .TP ERROR: program \fIprogram\fP: not a file (error) Program .I program needed on the tape server exists but is not a file. .TP ERROR: program \fIprogram\fP: not executable (error) Program .I program needed on the tape server exists but is not executable. .TP WARNING: program \fIprogram\fP: not setuid-root (warning) Program .I program needed on the tape server exists but should be owned by user "root" and setuid. .TP ERROR: \fIXXX\fP dir \fIdirectory\fP: not writable (error) Directory .I directory is either not writable, i.e. the dump user will not be able to create or remove files, or cannot be accessed, perhaps because a parent directory does not allow search permission. The .I XXX may be: .RS .TP log for the Amanda log directory (see .B logdir in .BR amanda.conf ) .TP oldlog for the directory that holds the old log files (see .B logdir in .BR amanda.conf ) .TP info for an Amanda database information directory (see .B curinfo in .BR amanda.conf ) or .TP index for an Amanda index directory (see .B indexdir in .BR amanda.conf ) .TP tapelist for the Amanda tapelist directory (see .B tapelist in .BR amanda.conf ) .RE .TP NOTE: \fIXXX\fP dir \fIdirectory\fP: does not exist (info) A database (info) or index directory does not exist or cannot be accessed. This might just mean this is a new client or disk, but if that is not the case, this should be treated as an error. .TP NOTE: it will be created on the next run (info) This indicates the info directory listed in the previous message will be created on the next run. .TP ERROR: \fIXXX\fP dir \fIname\fP: not a directory (error) .B Amcheck expected .I name to be a directory, but it is something else (e.g. file). .TP WARNING: info file \fIfile\fP: does not exist (warning) File .I file does not exist in the text format database. Since the parent directories do exist, the file should already have been created. .TP ERROR: info file \fIname\fP: not a file (error) .B Amcheck expected .I name to be a file, but it is something else (e.g. file). .TP ERROR: info file \fIfile\fP: not readable (error) The text format database file .I file is not readable. .TP ERROR: log file \fIfile\fP: not writable (error) Log file .I file (file .B log in .B logdir from .BR amanda.conf ) is either not writable, or cannot be accessed, perhaps because a parent directory does not allow search permission. .TP ERROR: tape list \fItapelist\fP: not writable (error) Amanda tape list file .I tapelist (see .B tapelist in .BR amanda.conf ) is not writable or was not found. .TP ERROR: tape list \fItapelist\fP: parse error (error) Amanda tape list file .I tapelist (see .B tapelist in .BR amanda.conf ) could not be read or parsed. .TP WARNING: tapedev is /dev/null, dumps will be thrown away (warning) The .B tapedev parameter in .B amanda.conf is set to .B /dev/null and Amanda uses that when debugging to throw all the dump images away. .TP WARNING: hold file \fIfile\fP exists (info) Hold file .I file exists and will cause .B amdump to pause at the beginning until it is removed. .TP ERROR: holding disk \fIdisk\fP: statfs: \fIerror message\fP (error) An error was returned from the .I statfs system call on holding disk .I disk (maybe because it does not exist). .TP ERROR: holding disk \fIdisk\fP: not writable (error) Holding disk .IR disk , is not writable, probably because the caller does not have write permission or a parent directory does not allow search permission. .TP WARNING: holding disk \fIdisk\fP: available space unknown \fIN\fP KB requested. (warning) .B Amcheck could not determine the amount of available space on holding disk .I disk to see if there were at least .I N KBytes available. .TP WARNING: holding disk \fIdisk\fP: only \fIF\fP KB free (\fIR\fP KB requested). (warning) .I Amanda.conf requested .I R KBytes of free space on holding disk .IR disk , but only .I F KBytes were available. 10 MBytes is subtracted for each backup process (see the .B inparallel .I amanda.conf option) to allow for unexpected overruns. .IP Note: even though this message is listed as a warning, it causes .B amcheck to exit with a non-zero status. .TP Holding disk \fIdisk\fP: \fIN\fP KB disk space available, that's plenty. (info) There was sufficient free space on holding disk .IR disk . .TP WARNING: holding disk \fIdisk\fP: only \fIF\fP KB free, using nothing (warning) Holding disk .I disk has .I F KBytes of free space, but that is not enough for what is requested in .IR amanda.conf . .TP Holding disk \fIdisk\fP: \fIF\fP KB disk space available, using \fIU\fP KB (info) Holding disk .I disk has .I F KBytes of free space and Amanda will be using up to .I U Kbytes. .TP WARNING: if a tape changer is not available, runtapes must be set to 1. (warning) The .B runtapes .I amanda.conf option must be set to 1 if the .B tpchanger .I amanda.conf option is not set. .TP ERROR: \fIerror message\fP. (error) An error was detected while initializing the tape changer. .TP ERROR: \fItape device\fP: \fIerror message\fP. (error) An error was detected while processing the tape label. .TP ERROR: cannot overwrite active tape \fIlabel\fP. (error) Tape .I label is still active and cannot be used. .TP ERROR: label \fIlabel\fP doesn't match labelstr "\fIpattern\fP". (error) The label on tape .I label does not match the .B labelstr .I amanda.conf option. .TP (expecting a new tape) (info) The tape is not OK and a new tape was expected. .TP (expecting tape \fIlabel\fP or a new tape) (info) The tape is not OK and either tape .I label or a new tape was expected. .TP ERROR: tape \fIlabel\fP label ok, but is not writable. (error) Tape .I label is OK, but the write enable test failed. .TP Tape \fIlabel\fP is writable. (info) Tape .I label is OK and the write enable test succeeded. .TP NOTE: skipping tape-writable test. (info) The tape write test (see the .B \-w option) was not enabled. .TP WARNING: skipping tape test because amdump or amflush seem to be running .TP WARNING: if they are not, you must run amcleanup (warning) It looked to .B amcheck like either .B amdump or .B amflush were running because a log file or amdump file exists. If they are not running, you probably need to run .B amcleanup to clear up a previous failure. Otherwise, you need to wait until they complete before running .BI amcheck . .TP NOTE: skipping tape checks (info) The tape tests are being skipped because you used the .B \-t command line option. .TP WARNING: \fIcompress\fP is not executable, server-compression and indexing will not work (warning) Compression program .I compress is not executable, so compression on the tape server host and creating index files will not work. .TP Tape \fIlabel\fP label ok. (info) Tape .I label is OK for the next run. .TP Server check took \fIS\fP seconds. (info) Reports how long the tape server host checks took. .TP ERROR: \fIhost\fP: could not resolve hostname (error) Could not look up client hostname .IR host . .TP Client check: \fIH\fP hosts checked in \fIS\fP seconds, \fIN\fP problems found. (info) Reports the number of client hosts checked, how long it took and the number of errors detected. .TP WARNING: \fIhost\fP: selfcheck request timed out. Host down? (warning) There was no response from .I host when trying to do the client checks. The host might really be down or it might not be configured properly. .TP ERROR: \fIhost\fP NAK: \fImessage\fP (error) .I Host reported a negative acknowledgment error of .I message to the status check request. .TP ERROR: \fIhost\fP NAK: [NAK parse failed] (error) .B Amcheck could not parse the negative acknowledgment error from .IR host . There might be an Amanda version mismatch between the host running .B amcheck and .IR host . .TP ERROR: \fIhost\fP [mutual-authentication failed] (error) Kerberos authentication failed while contacting .IR host . .TP ERROR: \fIhost\fP: \fImessage\fP (error) Error .I message was reported by the status check on .IR host . .SH AUTHOR James da Silva .br University of Maryland, College Park .SH "SEE ALSO" amanda(8), amdump(8)