1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
5 <!-- entities files to use -->
6 <!ENTITY % global_entities SYSTEM 'global.entities'>
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amcheck.8'>
14 <refentrytitle>amcheck</refentrytitle>
15 <manvolnum>8</manvolnum>
21 <refname>amcheck</refname>
22 <refpurpose>run Amanda self-checks</refpurpose>
28 <!-- body begins here -->
31 <command>amcheck</command>
32 <arg choice='opt'>-am</arg>
33 <arg choice='opt'>-w</arg>
34 <arg choice='opt'>-sclt</arg>
35 <arg choice='opt'>-M <replaceable>address</replaceable></arg>
36 <arg choice='opt'>--client-verbose</arg>
37 <arg choice='opt'>--exact-match</arg>
38 &configoverride.synopsis;
39 <arg choice='plain'><replaceable>config</replaceable></arg>
40 <arg choice='opt' rep='repeat'>
41 <arg choice='plain'><replaceable>host</replaceable></arg>
42 <arg choice='opt' rep='repeat'><replaceable>disk</replaceable></arg>
48 <refsect1><title>DESCRIPTION</title>
49 <para><emphasis remap='B'>Amcheck</emphasis>
50 runs a number of self-checks on both the Amanda tape server host and
51 the Amanda client hosts.</para>
53 <para>On the tape server host,
54 <command>amcheck</command>
55 can go through the same tape checking used at the start of the nightly
56 <emphasis remap='B'>amdump</emphasis>
57 run to verify the correct tape for the next run is mounted.</para>
59 <para><emphasis remap='B'>Amcheck</emphasis>
60 can also do a self-check on all client hosts
61 to make sure each host is running and that permissions
62 on filesystems to be backed up are correct.</para>
64 <para>You can specify many host/disk expressions, only disks that
65 match an expression will be checked. All disks are checked if no
66 expressions are given.</para>
69 <manref name="amanda" vol="8"/>
70 man page for more details about Amanda.</para>
73 <refsect1><title>OPTIONS</title>
74 <variablelist remap='TP'>
76 <term><option>-s</option></term>
78 <para>Run the tape server local and tape checks (same as
79 <option>-lt</option>).</para>
83 <term><option>-c</option></term>
85 <para>Run the client host checks. Multiple specific clients can be
86 checked by specifying the client name.</para>
90 <term><option>-l</option></term>
92 <para>Run the local tests (e.g. permissions) on the server host.</para>
96 <term><option>-t</option></term>
98 <para>Run the tape tests on the server host.</para>
102 <term><option>-w</option></term>
104 <para>Enables a DESTRUCTIVE check for write-protection on the
105 tape (which would otherwise cause the subsequent
106 <emphasis remap='B'>amdump</emphasis>
109 is writable, this check causes all data after the tape label to be
110 erased. If the <amkeyword>autolabel</amkeyword> option is enabled, this check may ERASE
111 any non-Amanda tape in the drive or changer.
112 The check enable the tape tests on the server host
113 and is only made if the tape is otherwise correct.</para>
117 <term><option>-m</option></term>
119 <para>Nothing is printed, but mail is sent if any errors are detected.
121 <emphasis remap='B'>mailto</emphasis>
122 address specified in the
123 <emphasis remap='I'>amanda.conf</emphasis>
125 <emphasis remap='I'>address</emphasis>
132 <term><option>-a</option></term>
136 but the mail is always sent.</para>
141 <term><option>-M</option> <replaceable>address</replaceable></term>
143 <para>Mail the report to
144 <emphasis remap='I'>address</emphasis>
146 <emphasis remap='B'>mailto</emphasis>
148 <emphasis remap='I'>amanda.conf</emphasis>.
150 <option>-m</option>.</para>
155 <term><option>--client-verbose</option></term>
157 <para>Print all client messages.</para>
162 <term><option>--exact-match</option></term>
164 <para>The host and disk are parsed as exact values</para>
169 <term><replaceable>host</replaceable> [<replaceable>disk</replaceable>]*</term>
171 <para>Specify the host and disk on which the command will work.</para>
175 &configoverride.varlistentry;
180 <option>-cs</option>.</para>
183 <refsect1><title>EXAMPLES</title>
184 <para>In this example, both the tape server and client tests are run.
185 The results are displayed on standard output.</para>
189 Amanda Tape Server Host Check
190 -----------------------------
191 /amanda2/amanda/work: 911475 KB disk space available, that's plenty.
192 NOTE: skipping tape-writable test.
194 Server check took 34.966 seconds.
196 Amanda Backup Client Hosts Check
197 --------------------------------
198 WARNING: northstar: selfcheck request timed out. Host down?
199 WARNING: drinkme: selfcheck request timed out. Host down?
200 WARNING: scruffy: selfcheck request timed out. Host down?
201 Client check: 136 hosts checked in 51.945 seconds, 3 problems found.
203 (brought to you by Amanda 2.5.0)
206 <para>In this example, if the line
207 <emphasis remap='B'>mailto csd-amanda</emphasis>
209 <emphasis remap='I'>amanda.conf</emphasis>,
211 <emphasis remap='B'>csd-amanda</emphasis>
212 if the server check returns an error.</para>
215 % amcheck -s -m daily
219 <refsect1><title>MESSAGES</title>
220 <variablelist remap='TP'>
222 <term>fatal slot <emphasis remap='I'>slot</emphasis>: <emphasis remap='I'>error message</emphasis></term>
225 The tape changer detected some kind of fatal error while trying to load slot
226 <emphasis remap='I'>slot</emphasis>.</para>
230 <term>slot <emphasis remap='I'>slot</emphasis>: <emphasis remap='I'>error message</emphasis></term>
233 The tape changer detected some kind of non-fatal error
234 (e.g. an empty slot was detected)
235 while trying to load slot
236 <emphasis remap='I'>slot</emphasis>,
237 or an error was detected trying to read the tape label.</para>
241 <term>slot <emphasis remap='I'>slot</emphasis>: date <emphasis remap='I'>YYYYMMDD</emphasis> label <emphasis remap='I'>label</emphasis> (<emphasis remap='I'>result</emphasis>)</term>
245 <emphasis remap='I'>label</emphasis>
247 <emphasis remap='I'>slot</emphasis>
248 was loaded and found to have been last written on
249 <emphasis remap='I'>YYYYMMDD</emphasis>.
250 If the tape is new, the date field will be an
251 <emphasis remap='I'>X</emphasis>.
253 <emphasis remap='I'>result</emphasis>
254 may be one of:</para>
256 <variablelist remap='TP'>
258 <term>exact label match</term>
260 <para>This is the expected tape.</para>
264 <term>no match</term>
266 <para>This label does not match the
267 <emphasis remap='B'>labelstr</emphasis>
269 <emphasis remap='I'>amanda.conf</emphasis>.
270 Tape scanning will continue.</para>
274 <term>active tape</term>
276 <para>This tape is still active and cannot be overwritten.
277 Tape scanning will continue.</para>
281 <term>first labelstr match</term>
283 <para>This tape is the first one that matches the
284 <emphasis remap='B'>labelstr</emphasis>
286 <emphasis remap='I'>amanda.conf</emphasis>.
287 Tape scanning will continue if necessary.</para>
291 <term>labelstr match</term>
293 <para>This tape is the next one that matches the
294 <emphasis remap='B'>labelstr</emphasis>
296 <emphasis remap='I'>amanda.conf</emphasis>.
297 Tape scanning will continue.</para>
305 <term>ERROR: cannot look up dump user <emphasis remap='I'>user</emphasis></term>
309 <emphasis remap='I'>user</emphasis>
311 <emphasis remap='I'>amanda.conf</emphasis>
312 could not be found in the system password information.</para>
316 <term>ERROR: cannot look up my own uid (<emphasis remap='I'>uid</emphasis>)</term>
320 <emphasis remap='I'>uid</emphasis>
322 <command>amcheck</command>
323 could not be found in the system password information.</para>
327 <term>ERROR: running as user <emphasis remap='I'>runuser</emphasis> instead of <emphasis remap='I'>dumpuser</emphasis></term>
330 <emphasis remap='B'>Amcheck</emphasis>
331 should be run as the dump user
332 <emphasis remap='I'>dumpuser</emphasis>
334 <emphasis remap='I'>amanda.conf</emphasis>
336 <emphasis remap='I'>runuser</emphasis>.</para>
340 <term>ERROR: program dir <emphasis remap='I'>directory</emphasis>: not accessible</term>
343 The directory Amanda expects to find its auxiliary programs in,
344 <emphasis remap='I'>directory</emphasis>,
345 is not accessible.</para>
349 <term>ERROR: program <emphasis remap='I'>program</emphasis>: does not exist</term>
353 <emphasis remap='I'>program</emphasis>
354 needed on the tape server could not be found.</para>
358 <term>ERROR: program <emphasis remap='I'>program</emphasis>: not a file</term>
362 <emphasis remap='I'>program</emphasis>
363 needed on the tape server exists but is not a file.</para>
367 <term>ERROR: program <emphasis remap='I'>program</emphasis>: not executable</term>
371 <emphasis remap='I'>program</emphasis>
372 needed on the tape server exists but is not executable.</para>
376 <term>WARNING: program <emphasis remap='I'>program</emphasis>: not setuid-root</term>
380 <emphasis remap='I'>program</emphasis>
381 needed on the tape server exists but should be owned by user "root"
386 <term>ERROR: <emphasis remap='I'>XXX</emphasis> dir <emphasis remap='I'>directory</emphasis>: not writable</term>
390 <emphasis remap='I'>directory</emphasis>
391 is either not writable,
392 i.e. the dump user will not be able to create or remove files,
393 or cannot be accessed, perhaps because a parent directory
394 does not allow search permission.
396 <emphasis remap='I'>XXX</emphasis>
399 <variablelist remap='TP'>
403 <para>for the Amanda log directory (see
404 <emphasis remap='B'>logdir</emphasis>
406 <emphasis remap='B'>amanda.conf</emphasis>)</para>
412 <para>for the directory that holds the old log files (see
413 <emphasis remap='B'>logdir</emphasis>
415 <emphasis remap='B'>amanda.conf</emphasis>)</para>
421 <para>for an Amanda database information directory (see
422 <emphasis remap='B'>curinfo</emphasis>
424 <emphasis remap='B'>amanda.conf</emphasis>)
431 <para>for an Amanda index directory (see
432 <emphasis remap='B'>indexdir</emphasis>
434 <emphasis remap='B'>amanda.conf</emphasis>)</para>
438 <term>tapelist</term>
440 <para>for the &tapelist;</para>
448 <term>NOTE: <emphasis remap='I'>XXX</emphasis> dir <emphasis remap='I'>directory</emphasis>: does not exist</term>
451 A database (info) or index directory does not exist or cannot be accessed.
452 This might just mean this is a new client or disk,
453 but if that is not the case, this should be treated as an error.</para>
457 <term>NOTE: it will be created on the next run</term>
460 This indicates the info directory listed in the previous message
461 will be created on the next run.</para>
465 <term>ERROR: <emphasis remap='I'>XXX</emphasis> dir <emphasis remap='I'>name</emphasis>: not a directory</term>
468 <emphasis remap='B'>Amcheck</emphasis>
470 <emphasis remap='I'>name</emphasis>
472 but it is something else (e.g. file).</para>
476 <term>WARNING: info file <filename>file</filename>: does not exist</term>
480 <emphasis remap='I'>file</emphasis>
481 does not exist in the text format database.
482 Since the parent directories do exist,
483 the file should already have been created.</para>
487 <term>ERROR: info file <filename>name</filename>: not a file</term>
490 <emphasis remap='B'>Amcheck</emphasis>
492 <emphasis remap='I'>name</emphasis>
494 but it is something else (e.g. file).</para>
498 <term>ERROR: info file <filename>file</filename>: not readable</term>
501 The text format database file
502 <emphasis remap='I'>file</emphasis>
503 is not readable.</para>
507 <term>ERROR: log file <filename>file</filename>: not writable</term>
511 <emphasis remap='I'>file</emphasis>
513 <emphasis remap='B'>log</emphasis>
515 <emphasis remap='B'>logdir</emphasis>
517 <emphasis remap='B'>amanda.conf</emphasis>)
518 is either not writable,
519 or cannot be accessed, perhaps because a parent directory
520 does not allow search permission.</para>
524 <term>ERROR: tape list <emphasis remap='I'>tapelist</emphasis>: not writable</term>
526 <para>(error) &tapelist; is not writable or was not found.</para>
530 <term>ERROR: tape list <emphasis remap='I'>tapelist</emphasis>: parse error</term>
532 <para>(error) &tapelist; could not be read or parsed.</para>
536 <term>WARNING: tapedev is /dev/null, dumps will be thrown away</term>
540 <emphasis remap='B'>tapedev</emphasis>
542 <emphasis remap='B'>amanda.conf</emphasis>
544 <filename>/dev/null</filename>
545 and Amanda uses that when debugging to throw all the dump images away.</para>
549 <term>WARNING: hold file <filename>file</filename> exists</term>
553 <emphasis remap='I'>file</emphasis>
554 exists and will cause
555 <emphasis remap='B'>amdump</emphasis>
556 to pause at the beginning until it is removed.</para>
560 <term>ERROR: holding disk <emphasis remap='I'>disk</emphasis>: statfs: <emphasis remap='I'>error message</emphasis></term>
563 An error was returned from the
564 <emphasis remap='I'>statfs</emphasis>
565 system call on holding disk
566 <emphasis remap='I'>disk</emphasis>
567 (maybe because it does not exist).</para>
571 <term>ERROR: holding disk <emphasis remap='I'>disk</emphasis>: not writable</term>
575 <emphasis remap='I'>disk</emphasis>,
577 probably because the caller does not have write permission
578 or a parent directory does not allow search permission.</para>
582 <term>WARNING: holding disk <emphasis remap='I'>disk</emphasis>: available space unknown <emphasis remap='I'>N</emphasis> KB requested.</term>
585 <emphasis remap='B'>Amcheck</emphasis>
586 could not determine the amount of available space on holding disk
587 <emphasis remap='I'>disk</emphasis>
588 to see if there were at least
589 <emphasis remap='I'>N</emphasis>
590 KBytes available.</para>
594 <term>WARNING: holding disk <emphasis remap='I'>disk</emphasis>: only <emphasis remap='I'>F</emphasis> KB free (<emphasis remap='I'>R</emphasis> KB requested).</term>
597 <emphasis remap='I'>amanda.conf</emphasis>
599 <emphasis remap='I'>R</emphasis>
600 KBytes of free space on holding disk
601 <emphasis remap='I'>disk</emphasis>,
603 <emphasis remap='I'>F</emphasis>
604 KBytes were available.
605 10 MBytes is subtracted for each backup process
607 <emphasis remap='B'>inparallel</emphasis>
608 <emphasis remap='I'>amanda.conf</emphasis>
610 to allow for unexpected overruns.</para>
611 <note><para>Even though this message is listed as a warning, it causes &amcheck; to exit with a non-zero status.</para>
617 <variablelist remap='TP'>
619 <term>Holding disk <emphasis remap='I'>disk</emphasis>: <emphasis remap='I'>N</emphasis> KB disk space available, that's plenty.</term>
622 There was sufficient free space on holding disk
623 <emphasis remap='I'>disk</emphasis>.</para>
627 <term>WARNING: holding disk <emphasis remap='I'>disk</emphasis>: only <emphasis remap='I'>F</emphasis> KB free, using nothing</term>
631 <emphasis remap='I'>disk</emphasis>
633 <emphasis remap='I'>F</emphasis>
634 KBytes of free space, but that is not enough for what is requested in
635 <emphasis remap='I'>amanda.conf</emphasis>.</para>
639 <term>Holding disk <emphasis remap='I'>disk</emphasis>: <emphasis remap='I'>F</emphasis> KB disk space available, using <emphasis remap='I'>U</emphasis> KB</term>
643 <emphasis remap='I'>disk</emphasis>
645 <emphasis remap='I'>F</emphasis>
646 KBytes of free space and Amanda will be using up to
647 <emphasis remap='I'>U</emphasis>
652 <term>WARNING: if a tape changer is not available, runtapes must be set to 1.</term>
656 <emphasis remap='B'>runtapes</emphasis>
657 <emphasis remap='I'>amanda.conf</emphasis>
658 option must be set to 1 if the
659 <emphasis remap='B'>tpchanger</emphasis>
660 <emphasis remap='I'>amanda.conf</emphasis>
661 option is not set.</para>
665 <term>ERROR: <emphasis remap='I'>error message</emphasis>.</term>
668 An error was detected while initializing the tape changer.</para>
672 <term>ERROR: <emphasis remap='I'>tape device</emphasis>: <emphasis remap='I'>error message</emphasis>.</term>
675 An error was detected while processing the tape label.</para>
679 <term>ERROR: cannot overwrite active tape <emphasis remap='I'>label</emphasis>.</term>
683 <emphasis remap='I'>label</emphasis>
684 is still active and cannot be used.</para>
688 <term>ERROR: label <emphasis remap='I'>label</emphasis> doesn't match labelstr <emphasis remap='I'>pattern</emphasis> .</term>
692 <emphasis remap='I'>label</emphasis>
694 <emphasis remap='B'>labelstr</emphasis>
695 <emphasis remap='I'>amanda.conf</emphasis>
700 <term>(expecting a new tape)</term>
703 The tape is not OK and a new tape was expected.</para>
707 <term>(expecting tape <emphasis remap='I'>label</emphasis> or a new tape)</term>
710 The tape is not OK and either tape
711 <emphasis remap='I'>label</emphasis>
712 or a new tape was expected.</para>
716 <term>ERROR: tape <emphasis remap='I'>label</emphasis> label ok, but is not writable.</term>
720 <emphasis remap='I'>label</emphasis>
721 is OK, but the write enable test failed.</para>
725 <term>Tape <emphasis remap='I'>label</emphasis> is writable.</term>
729 <emphasis remap='I'>label</emphasis>
730 is OK and the write enable test succeeded.</para>
734 <term>NOTE: skipping tape-writable test.</term>
737 The tape write test (see the
739 option) was not enabled.</para>
743 <term>WARNING: skipping tape test because amdump or amflush seem to be running</term>
744 <term>WARNING: if they are not, you must run amcleanup</term>
748 <command>amcheck</command>
750 <emphasis remap='B'>amdump</emphasis>
752 <emphasis remap='B'>amflush</emphasis>
753 were running because a log file or amdump file exists.
754 If they are not running, you probably need to run
755 <emphasis remap='B'>amcleanup</emphasis>
756 to clear up a previous failure.
757 Otherwise, you need to wait until they complete before running
758 <command>amcheck</command><literal>.</literal></para>
762 <term>NOTE: skipping tape checks</term>
765 The tape tests are being skipped because you used the
767 command line option.</para>
771 <term>WARNING: <emphasis remap='I'>compress</emphasis> is not executable, server-compression and indexing will not work</term>
775 <emphasis remap='I'>compress</emphasis>
777 so compression on the tape server host and creating index files will not work.</para>
781 <term>Tape <emphasis remap='I'>label</emphasis> label ok.</term>
785 <emphasis remap='I'>label</emphasis>
791 <term>Server check took <emphasis remap='I'>S</emphasis> seconds.</term>
794 Reports how long the tape server host checks took.</para>
798 <term>ERROR: <emphasis remap='I'>host</emphasis>: could not resolve hostname</term>
801 Could not look up client hostname
802 <emphasis remap='I'>host</emphasis>.</para>
806 <term>Client check: <emphasis remap='I'>H</emphasis> hosts checked in <emphasis remap='I'>S</emphasis> seconds, <emphasis remap='I'>N</emphasis> problems found.</term>
809 Reports the number of client hosts checked,
810 how long it took and the number of errors detected.</para>
814 <term>WARNING: <emphasis remap='I'>host</emphasis>: selfcheck request timed out. Host down?</term>
817 There was no response from
818 <emphasis remap='I'>host</emphasis>
819 when trying to do the client checks.
820 The host might really be down or it might not be configured properly.</para>
824 <term>ERROR: <emphasis remap='I'>host</emphasis> NAK: <emphasis remap='I'>message</emphasis></term>
827 <emphasis remap='I'>Host</emphasis>
828 reported a negative acknowledgment error of
829 <emphasis remap='I'>message</emphasis>
830 to the status check request.</para>
834 <term>ERROR: <emphasis remap='I'>host</emphasis> NAK: [NAK parse failed]</term>
837 <emphasis remap='B'>Amcheck</emphasis>
838 could not parse the negative acknowledgment error from
839 <emphasis remap='I'>host</emphasis>.
840 There might be an Amanda version mismatch between the host running
841 <command>amcheck</command>
843 <emphasis remap='I'>host</emphasis>.</para>
847 <term>ERROR: <emphasis remap='I'>host</emphasis> [mutual-authentication failed]</term>
850 Kerberos authentication failed while contacting
851 <emphasis remap='I'>host</emphasis>.</para>
855 <term>ERROR: <emphasis remap='I'>host</emphasis>: <emphasis remap='I'>message</emphasis></term>
859 <emphasis remap='I'>message</emphasis>
860 was reported by the status check on
861 <emphasis remap='I'>host</emphasis>.</para>
867 <refsect1><title>EXIT CODE</title>
868 The exit code of <command>amcheck</command> is one of:
876 <manref name="amanda.conf" vol="5"/>
877 <manref name="amdump" vol="8"/>