'\" t .\" Title: amcheck .\" Author: James da Silva .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 12/01/2017 .\" Manual: System Administration Commands .\" Source: Amanda 3.5.1 .\" Language: English .\" .TH "AMCHECK" "8" "12/01/2017" "Amanda 3\&.5\&.1" "System Administration Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" amcheck \- run Amanda self\-checks .SH "SYNOPSIS" .HP \w'\fBamcheck\fR\ 'u \fBamcheck\fR [\-am] [\-w] [\-sclt] [\-M\ \fIaddress\fR] [\-\-client\-verbose] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] .SH "DESCRIPTION" .PP \fBAmcheck\fR runs a number of self\-checks on both the Amanda tape server host and the Amanda client hosts\&. .PP On the tape server host, \fBamcheck\fR can go through the same tape checking used at the start of the nightly \fBamdump\fR run to verify the correct tape for the next run is mounted\&. .PP \fBAmcheck\fR 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\&. .PP You can specify many host/disk expressions, only disks that match an expression will be checked\&. All disks are checked if no expressions are given\&. .PP See the \fBamanda\fR(8) man page for more details about Amanda\&. .SH "OPTIONS" .PP \fB\-s\fR .RS 4 Run the tape server local and tape checks (same as \fB\-lt\fR)\&. .RE .PP \fB\-c\fR .RS 4 Run the client host checks\&. Multiple specific clients can be checked by specifying the client name\&. .RE .PP \fB\-l\fR .RS 4 Run the local tests (e\&.g\&. permissions) on the server host\&. .RE .PP \fB\-t\fR .RS 4 Run the tape tests on the server host\&. .RE .PP \fB\-w\fR .RS 4 Enables a DESTRUCTIVE check for write\-protection on the tape (which would otherwise cause the subsequent \fBamdump\fR to fail)\&. If the tape is writable, this check causes all data after the tape label to be erased\&. If the \fBautolabel\fR option is enabled, this check may ERASE any non\-Amanda tape in the drive or changer\&. The check enable the tape tests on the server host and is only made if the tape is otherwise correct\&. .RE .PP \fB\-m\fR .RS 4 Nothing is printed, but mail is sent if any errors are detected\&. The mail goes to the \fBmailto\fR address specified in the \fIamanda\&.conf\fR file or the \fIaddress\fR value if \fB\-M\fR is set\&. .RE .PP \fB\-a\fR .RS 4 Like \fB\-m\fR but the mail is always sent\&. .RE .PP \fB\-M\fR \fIaddress\fR .RS 4 Mail the report to \fIaddress\fR instead of the \fBmailto\fR value from \fIamanda\&.conf\fR\&. Implies \fB\-m\fR\&. .RE .PP \fB\-\-client\-verbose\fR .RS 4 Print all client messages\&. .RE .PP \fB\-\-exact\-match\fR .RS 4 The host and disk are parsed as exact values .RE .PP \fIhost\fR [\fIdisk\fR]* .RS 4 Specify the host and disk on which the command will work\&. .RE .PP \fB\-o \fR\fB\fIconfigoption\fR\fR .RS 4 See the "CONFIGURATION OVERRIDE" section in \fBamanda\fR(8)\&. .RE .PP The default is \fB\-cs\fR\&. .SH "EXAMPLES" .PP In this example, both the tape server and client tests are run\&. The results are displayed on standard output\&. .nf % amcheck daily Amanda Tape Server Host Check \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- /amanda2/amanda/work: 911475 KB disk space available, that\*(Aqs 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\&.5\&.0) .fi .PP In this example, if the line \fBmailto csd\-amanda\fR is in \fIamanda\&.conf\fR, mail will be sent to \fBcsd\-amanda\fR if the server check returns an error\&. .nf % amcheck \-s \-m daily .fi .SH "MESSAGES" .PP fatal slot \fIslot\fR: \fIerror message\fR .RS 4 (error) The tape changer detected some kind of fatal error while trying to load slot \fIslot\fR\&. .RE .PP slot \fIslot\fR: \fIerror message\fR .RS 4 (warning) The tape changer detected some kind of non\-fatal error (e\&.g\&. an empty slot was detected) while trying to load slot \fIslot\fR, or an error was detected trying to read the tape label\&. .RE .PP slot \fIslot\fR: date \fIYYYYMMDD\fR label \fIlabel\fR (\fIresult\fR) .RS 4 (info) Tape \fIlabel\fR in slot \fIslot\fR was loaded and found to have been last written on \fIYYYYMMDD\fR\&. If the tape is new, the date field will be an \fIX\fR\&. The \fIresult\fR may be one of: .PP exact label match .RS 4 This is the expected tape\&. .RE .PP no match .RS 4 This label does not match the \fBlabelstr\fR pattern in \fIamanda\&.conf\fR\&. Tape scanning will continue\&. .RE .PP active tape .RS 4 This tape is still active and cannot be overwritten\&. Tape scanning will continue\&. .RE .PP first labelstr match .RS 4 This tape is the first one that matches the \fBlabelstr\fR pattern in \fIamanda\&.conf\fR\&. Tape scanning will continue if necessary\&. .RE .PP labelstr match .RS 4 This tape is the next one that matches the \fBlabelstr\fR pattern in \fIamanda\&.conf\fR\&. Tape scanning will continue\&. .RE .sp .RE .PP ERROR: cannot look up dump user \fIuser\fR .RS 4 (error) Dump user \fIuser\fR from \fIamanda\&.conf\fR could not be found in the system password information\&. .RE .PP ERROR: cannot look up my own uid (\fIuid\fR) .RS 4 (error) User id \fIuid\fR running \fBamcheck\fR could not be found in the system password information\&. .RE .PP ERROR: running as user \fIrunuser\fR instead of \fIdumpuser\fR .RS 4 (error) \fBAmcheck\fR should be run as the dump user \fIdumpuser\fR from \fIamanda\&.conf\fR instead of \fIrunuser\fR\&. .RE .PP ERROR: program dir \fIdirectory\fR: not accessible .RS 4 (error) The directory Amanda expects to find its auxiliary programs in, \fIdirectory\fR, is not accessible\&. .RE .PP ERROR: program \fIprogram\fR: does not exist .RS 4 (error) Program \fIprogram\fR needed on the tape server could not be found\&. .RE .PP ERROR: program \fIprogram\fR: not a file .RS 4 (error) Program \fIprogram\fR needed on the tape server exists but is not a file\&. .RE .PP ERROR: program \fIprogram\fR: not executable .RS 4 (error) Program \fIprogram\fR needed on the tape server exists but is not executable\&. .RE .PP WARNING: program \fIprogram\fR: not setuid\-root .RS 4 (warning) Program \fIprogram\fR needed on the tape server exists but should be owned by user "root" and setuid\&. .RE .PP ERROR: \fIXXX\fR dir \fIdirectory\fR: not writable .RS 4 (error) Directory \fIdirectory\fR 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 \fIXXX\fR may be: .PP log .RS 4 for the Amanda log directory (see \fBlogdir\fR in \fBamanda\&.conf\fR) .RE .PP oldlog .RS 4 for the directory that holds the old log files (see \fBlogdir\fR in \fBamanda\&.conf\fR) .RE .PP info .RS 4 for an Amanda database information directory (see \fBcurinfo\fR in \fBamanda\&.conf\fR) or .RE .PP index .RS 4 for an Amanda index directory (see \fBindexdir\fR in \fBamanda\&.conf\fR) .RE .PP tapelist .RS 4 for the \fBtapelist\fR(5) .RE .sp .RE .PP NOTE: \fIXXX\fR dir \fIdirectory\fR: does not exist .RS 4 (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\&. .RE .PP NOTE: it will be created on the next run .RS 4 (info) This indicates the info directory listed in the previous message will be created on the next run\&. .RE .PP ERROR: \fIXXX\fR dir \fIname\fR: not a directory .RS 4 (error) \fBAmcheck\fR expected \fIname\fR to be a directory, but it is something else (e\&.g\&. file)\&. .RE .PP WARNING: info file file: does not exist .RS 4 (warning) File \fIfile\fR does not exist in the text format database\&. Since the parent directories do exist, the file should already have been created\&. .RE .PP ERROR: info file name: not a file .RS 4 (error) \fBAmcheck\fR expected \fIname\fR to be a file, but it is something else (e\&.g\&. file)\&. .RE .PP ERROR: info file file: not readable .RS 4 (error) The text format database file \fIfile\fR is not readable\&. .RE .PP ERROR: log file file: not writable .RS 4 (error) Log file \fIfile\fR (file \fBlog\fR in \fBlogdir\fR from \fBamanda\&.conf\fR) is either not writable, or cannot be accessed, perhaps because a parent directory does not allow search permission\&. .RE .PP ERROR: tape list \fItapelist\fR: not writable .RS 4 (error) \fBtapelist\fR(5) is not writable or was not found\&. .RE .PP ERROR: tape list \fItapelist\fR: parse error .RS 4 (error) \fBtapelist\fR(5) could not be read or parsed\&. .RE .PP WARNING: tapedev is /dev/null, dumps will be thrown away .RS 4 (warning) The \fBtapedev\fR parameter in \fBamanda\&.conf\fR is set to /dev/null and Amanda uses that when debugging to throw all the dump images away\&. .RE .PP WARNING: hold file file exists .RS 4 (info) Hold file \fIfile\fR exists and will cause \fBamdump\fR to pause at the beginning until it is removed\&. .RE .PP ERROR: holding disk \fIdisk\fR: statfs: \fIerror message\fR .RS 4 (error) An error was returned from the \fIstatfs\fR system call on holding disk \fIdisk\fR (maybe because it does not exist)\&. .RE .PP ERROR: holding disk \fIdisk\fR: not writable .RS 4 (error) Holding disk \fIdisk\fR, is not writable, probably because the caller does not have write permission or a parent directory does not allow search permission\&. .RE .PP WARNING: holding disk \fIdisk\fR: available space unknown \fIN\fR KB requested\&. .RS 4 (warning) \fBAmcheck\fR could not determine the amount of available space on holding disk \fIdisk\fR to see if there were at least \fIN\fR KBytes available\&. .RE .PP WARNING: holding disk \fIdisk\fR: only \fIF\fR KB free (\fIR\fR KB requested)\&. .RS 4 (warning) \fIamanda\&.conf\fR requested \fIR\fR KBytes of free space on holding disk \fIdisk\fR, but only \fIF\fR KBytes were available\&. 10 MBytes is subtracted for each backup process (see the \fBinparallel\fR\fIamanda\&.conf\fR option) to allow for unexpected overruns\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br Even though this message is listed as a warning, it causes \fBamcheck\fR to exit with a non\-zero status\&. .sp .5v .RE .RE .PP Holding disk \fIdisk\fR: \fIN\fR KB disk space available, that\*(Aqs plenty\&. .RS 4 (info) There was sufficient free space on holding disk \fIdisk\fR\&. .RE .PP WARNING: holding disk \fIdisk\fR: only \fIF\fR KB free, using nothing .RS 4 (warning) Holding disk \fIdisk\fR has \fIF\fR KBytes of free space, but that is not enough for what is requested in \fIamanda\&.conf\fR\&. .RE .PP Holding disk \fIdisk\fR: \fIF\fR KB disk space available, using \fIU\fR KB .RS 4 (info) Holding disk \fIdisk\fR has \fIF\fR KBytes of free space and Amanda will be using up to \fIU\fR Kbytes\&. .RE .PP WARNING: if a tape changer is not available, runtapes must be set to 1\&. .RS 4 (warning) The \fBruntapes\fR\fIamanda\&.conf\fR option must be set to 1 if the \fBtpchanger\fR\fIamanda\&.conf\fR option is not set\&. .RE .PP ERROR: \fIerror message\fR\&. .RS 4 (error) An error was detected while initializing the tape changer\&. .RE .PP ERROR: \fItape device\fR: \fIerror message\fR\&. .RS 4 (error) An error was detected while processing the tape label\&. .RE .PP ERROR: cannot overwrite active tape \fIlabel\fR\&. .RS 4 (error) Tape \fIlabel\fR is still active and cannot be used\&. .RE .PP ERROR: label \fIlabel\fR doesn\*(Aqt match labelstr \fIpattern\fR \&. .RS 4 (error) The label on tape \fIlabel\fR does not match the \fBlabelstr\fR\fIamanda\&.conf\fR option\&. .RE .PP (expecting a new tape) .RS 4 (info) The tape is not OK and a new tape was expected\&. .RE .PP (expecting tape \fIlabel\fR or a new tape) .RS 4 (info) The tape is not OK and either tape \fIlabel\fR or a new tape was expected\&. .RE .PP ERROR: tape \fIlabel\fR label ok, but is not writable\&. .RS 4 (error) Tape \fIlabel\fR is OK, but the write enable test failed\&. .RE .PP Tape \fIlabel\fR is writable\&. .RS 4 (info) Tape \fIlabel\fR is OK and the write enable test succeeded\&. .RE .PP NOTE: skipping tape\-writable test\&. .RS 4 (info) The tape write test (see the \fB\-w\fR option) was not enabled\&. .RE .PP WARNING: skipping tape test because amdump or amflush seem to be running, WARNING: if they are not, you must run amcleanup .RS 4 (warning) It looked to \fBamcheck\fR like either \fBamdump\fR or \fBamflush\fR were running because a log file or amdump file exists\&. If they are not running, you probably need to run \fBamcleanup\fR to clear up a previous failure\&. Otherwise, you need to wait until they complete before running \fBamcheck\fR\&. .RE .PP NOTE: skipping tape checks .RS 4 (info) The tape tests are being skipped because you used the \fB\-t\fR command line option\&. .RE .PP WARNING: \fIcompress\fR is not executable, server\-compression and indexing will not work .RS 4 (warning) Compression program \fIcompress\fR is not executable, so compression on the tape server host and creating index files will not work\&. .RE .PP Tape \fIlabel\fR label ok\&. .RS 4 (info) Tape \fIlabel\fR is OK for the next run\&. .RE .PP Server check took \fIS\fR seconds\&. .RS 4 (info) Reports how long the tape server host checks took\&. .RE .PP ERROR: \fIhost\fR: could not resolve hostname .RS 4 (error) Could not look up client hostname \fIhost\fR\&. .RE .PP Client check: \fIH\fR hosts checked in \fIS\fR seconds, \fIN\fR problems found\&. .RS 4 (info) Reports the number of client hosts checked, how long it took and the number of errors detected\&. .RE .PP WARNING: \fIhost\fR: selfcheck request timed out\&. Host down? .RS 4 (warning) There was no response from \fIhost\fR when trying to do the client checks\&. The host might really be down or it might not be configured properly\&. .RE .PP ERROR: \fIhost\fR NAK: \fImessage\fR .RS 4 (error) \fIHost\fR reported a negative acknowledgment error of \fImessage\fR to the status check request\&. .RE .PP ERROR: \fIhost\fR NAK: [NAK parse failed] .RS 4 (error) \fBAmcheck\fR could not parse the negative acknowledgment error from \fIhost\fR\&. There might be an Amanda version mismatch between the host running \fBamcheck\fR and \fIhost\fR\&. .RE .PP ERROR: \fIhost\fR [mutual\-authentication failed] .RS 4 (error) Kerberos authentication failed while contacting \fIhost\fR\&. .RE .PP ERROR: \fIhost\fR: \fImessage\fR .RS 4 (error) Error \fImessage\fR was reported by the status check on \fIhost\fR\&. .RE .SH "EXIT CODE" The exit code of \fBamcheck\fR is one of: .nf 0 = success 1 = error .fi .SH "SEE ALSO" .PP \fBamanda\fR(8), \fBamanda.conf\fR(5), \fBamdump\fR(8) .PP The Amanda Wiki: : http://wiki.zmanda.com/ .SH "AUTHORS" .PP \fBJames da Silva\fR <\&jds@amanda\&.org\&> .PP \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>