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 '../entities/global.entities'>
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amcheck.8'>
14 <refentrytitle>amcheck</refentrytitle>
15 <manvolnum>8</manvolnum>
18 <refname>amcheck</refname>
19 <refpurpose>run &A; self-checks</refpurpose>
21 <!-- body begins here -->
24 <command>amcheck</command>
25 <arg choice='opt'>-am</arg>
26 <arg choice='opt'>-w</arg>
27 <arg choice='opt'>-sclt</arg>
28 <group><arg choice='plain'>-M</arg><arg choice='plain'><replaceable>address</replaceable></arg></group>*
29 <arg choice='plain'><replaceable>config</replaceable></arg>
30 <group><arg choice='plain'><replaceable>host</replaceable></arg><arg choice='opt'><replaceable>disk</replaceable></arg>*</group>*
31 <group><arg choice='plain'>-o</arg><arg choice='plain'><replaceable>configoption</replaceable></arg></group>*
36 <refsect1><title>DESCRIPTION</title>
37 <para><emphasis remap='B'>Amcheck</emphasis>
38 runs a number of self-checks on both the &A; tape server host and
39 the &A; client hosts.</para>
41 <para>On the tape server host,
42 <command>amcheck</command>
43 can go through the same tape checking used at the start of the nightly
44 <emphasis remap='B'>amdump</emphasis>
45 run to verify the correct tape for the next run is mounted.</para>
47 <para><emphasis remap='B'>Amcheck</emphasis>
48 can also do a self-check on all client hosts
49 to make sure each host is running and that permissions
50 on filesystems to be backed up are correct.</para>
52 <para>You can specify many host/disk expressions, only disks that
53 match an expression will be checked. All disks are checked if no
54 expressions are given.</para>
57 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
58 man page for more details about &A;.</para>
61 <refsect1><title>OPTIONS</title>
62 <variablelist remap='TP'>
64 <term><option>-s</option></term>
66 <para>Run the tape server local and tape checks (same as
67 <option>-lt</option>).</para>
71 <term><option>-c</option></term>
73 <para>Run the client host checks.Multiple specific clients can be
74 checked by specifying the client name.</para>
78 <term><option>-l</option></term>
80 <para>Run the local tests (e.g. permissions) on the server host.</para>
84 <term><option>-t</option></term>
86 <para>Run the tape tests on the server host.</para>
90 <term><option>-w</option></term>
92 <para>Enables a DESTRUCTIVE check for write-protection on the
93 tape (which would otherwise cause the subsequent
94 <emphasis remap='B'>amdump</emphasis>
97 is writable, this check causes all data after the tape label to be
98 erased. If the label_new_tapes option is enabled, this check may ERASE
99 any non-Amanda tape in the drive or changer.
100 The check enable the tape tests on the server host
101 and is only made if the tape is otherwise correct.</para>
105 <term><option>-m</option></term>
107 <para>Nothing is printed, but mail is sent if any errors are detected.
109 <emphasis remap='B'>mailto</emphasis>
110 address specified in the
111 <emphasis remap='I'>amanda.conf</emphasis>
113 <emphasis remap='I'>address</emphasis>
120 <term><option>-a</option></term>
124 but the mail is always sent.</para>
129 <term><option>-M</option> <replaceable>address</replaceable></term>
131 <para>Mail the report to
132 <emphasis remap='I'>address</emphasis>
134 <emphasis remap='B'>mailto</emphasis>
136 <emphasis remap='I'>amanda.conf</emphasis>.
138 <option>-m</option>.</para>
143 <term><replaceable>host</replaceable> [<replaceable>disk</replaceable>]*</term>
145 <para>Specify the host and disk on which the command will work.</para>
150 <term><emphasis remap='B'>-o</emphasis> <replaceable>configoption</replaceable></term>
152 <para>See the "<emphasis remap='B'>CONFIGURATION OVERWRITE</emphasis>" section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
158 <option>-cs</option>.</para>
161 <refsect1><title>EXAMPLES</title>
162 <para>In this example, both the tape server and client tests are run.
163 The results are displayed on standard output.</para>
167 &A; Tape Server Host Check
168 -----------------------------
169 /amanda2/amanda/work: 911475 KB disk space available, that's plenty.
170 NOTE: skipping tape-writable test.
172 Server check took 34.966 seconds.
174 &A; Backup Client Hosts Check
175 --------------------------------
176 WARNING: northstar: selfcheck request timed out. Host down?
177 WARNING: drinkme: selfcheck request timed out. Host down?
178 WARNING: scruffy: selfcheck request timed out. Host down?
179 Client check: 136 hosts checked in 51.945 seconds, 3 problems found.
181 (brought to you by &A; 2.5.0)
184 <para>In this example, if the line
185 <emphasis remap='B'>mailto csd-amanda</emphasis>
187 <emphasis remap='I'>amanda.conf</emphasis>,
189 <emphasis remap='B'>csd-amanda</emphasis>
190 if the server check returns an error.</para>
193 % amcheck -s -m daily
197 <refsect1><title>MESSAGES</title>
198 <variablelist remap='TP'>
200 <term>fatal slot <emphasis remap='I'>slot</emphasis>: <emphasis remap='I'>error message</emphasis></term>
203 The tape changer detected some kind of fatal error while trying to load slot
204 <emphasis remap='I'>slot</emphasis>.</para>
208 <term>slot <emphasis remap='I'>slot</emphasis>: <emphasis remap='I'>error message</emphasis></term>
211 The tape changer detected some kind of non-fatal error
212 (e.g. an empty slot was detected)
213 while trying to load slot
214 <emphasis remap='I'>slot</emphasis>,
215 or an error was detected trying to read the tape label.</para>
219 <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>
223 <emphasis remap='I'>label</emphasis>
225 <emphasis remap='I'>slot</emphasis>
226 was loaded and found to have been last written on
227 <emphasis remap='I'>YYYYMMDD</emphasis>.
228 If the tape is new, the date field will be an
229 <emphasis remap='I'>X</emphasis>.
231 <emphasis remap='I'>result</emphasis>
232 may be one of:</para>
234 <variablelist remap='TP'>
236 <term>exact label match</term>
238 <para>This is the expected tape.</para>
242 <term>no match</term>
244 <para>This label does not match the
245 <emphasis remap='B'>labelstr</emphasis>
247 <emphasis remap='I'>amanda.conf</emphasis>.
248 Tape scanning will continue.</para>
252 <term>active tape</term>
254 <para>This tape is still active and cannot be overwritten.
255 Tape scanning will continue.</para>
259 <term>first labelstr match</term>
261 <para>This tape is the first one that matches the
262 <emphasis remap='B'>labelstr</emphasis>
264 <emphasis remap='I'>amanda.conf</emphasis>.
265 Tape scanning will continue if necessary.</para>
269 <term>labelstr match</term>
271 <para>This tape is the next one that matches the
272 <emphasis remap='B'>labelstr</emphasis>
274 <emphasis remap='I'>amanda.conf</emphasis>.
275 Tape scanning will continue.</para>
283 <term>ERROR: cannot look up dump user <emphasis remap='I'>user</emphasis></term>
287 <emphasis remap='I'>user</emphasis>
289 <emphasis remap='I'>amanda.conf</emphasis>
290 could not be found in the system password information.</para>
294 <term>ERROR: cannot look up my own uid (<emphasis remap='I'>uid</emphasis>)</term>
298 <emphasis remap='I'>uid</emphasis>
300 <command>amcheck</command>
301 could not be found in the system password information.</para>
305 <term>ERROR: running as user <emphasis remap='I'>runuser</emphasis> instead of <emphasis remap='I'>dumpuser</emphasis></term>
308 <emphasis remap='B'>Amcheck</emphasis>
309 should be run as the dump user
310 <emphasis remap='I'>dumpuser</emphasis>
312 <emphasis remap='I'>amanda.conf</emphasis>
314 <emphasis remap='I'>runuser</emphasis>.</para>
318 <term>ERROR: program dir <emphasis remap='I'>directory</emphasis>: not accessible</term>
321 The directory &A; expects to find its auxiliary programs in,
322 <emphasis remap='I'>directory</emphasis>,
323 is not accessible.</para>
327 <term>ERROR: program <emphasis remap='I'>program</emphasis>: does not exist</term>
331 <emphasis remap='I'>program</emphasis>
332 needed on the tape server could not be found.</para>
336 <term>ERROR: program <emphasis remap='I'>program</emphasis>: not a file</term>
340 <emphasis remap='I'>program</emphasis>
341 needed on the tape server exists but is not a file.</para>
345 <term>ERROR: program <emphasis remap='I'>program</emphasis>: not executable</term>
349 <emphasis remap='I'>program</emphasis>
350 needed on the tape server exists but is not executable.</para>
354 <term>WARNING: program <emphasis remap='I'>program</emphasis>: not setuid-root</term>
358 <emphasis remap='I'>program</emphasis>
359 needed on the tape server exists but should be owned by user "root"
364 <term>ERROR: <emphasis remap='I'>XXX</emphasis> dir <emphasis remap='I'>directory</emphasis>: not writable</term>
368 <emphasis remap='I'>directory</emphasis>
369 is either not writable,
370 i.e. the dump user will not be able to create or remove files,
371 or cannot be accessed, perhaps because a parent directory
372 does not allow search permission.
374 <emphasis remap='I'>XXX</emphasis>
377 <variablelist remap='TP'>
381 <para>for the &A; log directory (see
382 <emphasis remap='B'>logdir</emphasis>
384 <emphasis remap='B'>amanda.conf</emphasis>)</para>
390 <para>for the directory that holds the old log files (see
391 <emphasis remap='B'>logdir</emphasis>
393 <emphasis remap='B'>amanda.conf</emphasis>)</para>
399 <para>for an &A; database information directory (see
400 <emphasis remap='B'>curinfo</emphasis>
402 <emphasis remap='B'>amanda.conf</emphasis>)
409 <para>for an &A; index directory (see
410 <emphasis remap='B'>indexdir</emphasis>
412 <emphasis remap='B'>amanda.conf</emphasis>)</para>
416 <term>tapelist</term>
418 <para>for the &A; tapelist directory (see
419 <emphasis remap='B'>tapelist</emphasis>
421 <emphasis remap='B'>amanda.conf</emphasis>)</para>
429 <term>NOTE: <emphasis remap='I'>XXX</emphasis> dir <emphasis remap='I'>directory</emphasis>: does not exist</term>
432 A database (info) or index directory does not exist or cannot be accessed.
433 This might just mean this is a new client or disk,
434 but if that is not the case, this should be treated as an error.</para>
438 <term>NOTE: it will be created on the next run</term>
441 This indicates the info directory listed in the previous message
442 will be created on the next run.</para>
446 <term>ERROR: <emphasis remap='I'>XXX</emphasis> dir <emphasis remap='I'>name</emphasis>: not a directory</term>
449 <emphasis remap='B'>Amcheck</emphasis>
451 <emphasis remap='I'>name</emphasis>
453 but it is something else (e.g. file).</para>
457 <term>WARNING: info file <filename>file</filename>: does not exist</term>
461 <emphasis remap='I'>file</emphasis>
462 does not exist in the text format database.
463 Since the parent directories do exist,
464 the file should already have been created.</para>
468 <term>ERROR: info file <filename>name</filename>: not a file</term>
471 <emphasis remap='B'>Amcheck</emphasis>
473 <emphasis remap='I'>name</emphasis>
475 but it is something else (e.g. file).</para>
479 <term>ERROR: info file <filename>file</filename>: not readable</term>
482 The text format database file
483 <emphasis remap='I'>file</emphasis>
484 is not readable.</para>
488 <term>ERROR: log file <filename>file</filename>: not writable</term>
492 <emphasis remap='I'>file</emphasis>
494 <emphasis remap='B'>log</emphasis>
496 <emphasis remap='B'>logdir</emphasis>
498 <emphasis remap='B'>amanda.conf</emphasis>)
499 is either not writable,
500 or cannot be accessed, perhaps because a parent directory
501 does not allow search permission.</para>
505 <term>ERROR: tape list <emphasis remap='I'>tapelist</emphasis>: not writable</term>
509 <emphasis remap='I'>tapelist</emphasis>
511 <emphasis remap='B'>tapelist</emphasis>
513 <emphasis remap='B'>amanda.conf</emphasis>)
514 is not writable or was not found.</para>
518 <term>ERROR: tape list <emphasis remap='I'>tapelist</emphasis>: parse error</term>
522 <emphasis remap='I'>tapelist</emphasis>
524 <emphasis remap='B'>tapelist</emphasis>
526 <emphasis remap='B'>amanda.conf</emphasis>)
527 could not be read or parsed.</para>
531 <term>WARNING: tapedev is /dev/null, dumps will be thrown away</term>
535 <emphasis remap='B'>tapedev</emphasis>
537 <emphasis remap='B'>amanda.conf</emphasis>
539 <filename>/dev/null</filename>
540 and &A; uses that when debugging to throw all the dump images away.</para>
544 <term>WARNING: hold file <filename>file</filename> exists</term>
548 <emphasis remap='I'>file</emphasis>
549 exists and will cause
550 <emphasis remap='B'>amdump</emphasis>
551 to pause at the beginning until it is removed.</para>
555 <term>ERROR: holding disk <emphasis remap='I'>disk</emphasis>: statfs: <emphasis remap='I'>error message</emphasis></term>
558 An error was returned from the
559 <emphasis remap='I'>statfs</emphasis>
560 system call on holding disk
561 <emphasis remap='I'>disk</emphasis>
562 (maybe because it does not exist).</para>
566 <term>ERROR: holding disk <emphasis remap='I'>disk</emphasis>: not writable</term>
570 <emphasis remap='I'>disk</emphasis>,
572 probably because the caller does not have write permission
573 or a parent directory does not allow search permission.</para>
577 <term>WARNING: holding disk <emphasis remap='I'>disk</emphasis>: available space unknown <emphasis remap='I'>N</emphasis> KB requested.</term>
580 <emphasis remap='B'>Amcheck</emphasis>
581 could not determine the amount of available space on holding disk
582 <emphasis remap='I'>disk</emphasis>
583 to see if there were at least
584 <emphasis remap='I'>N</emphasis>
585 KBytes available.</para>
589 <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>
592 <emphasis remap='I'>amanda.conf</emphasis>
594 <emphasis remap='I'>R</emphasis>
595 KBytes of free space on holding disk
596 <emphasis remap='I'>disk</emphasis>,
598 <emphasis remap='I'>F</emphasis>
599 KBytes were available.
600 10 MBytes is subtracted for each backup process
602 <emphasis remap='B'>inparallel</emphasis>
603 <emphasis remap='I'>amanda.conf</emphasis>
605 to allow for unexpected overruns.</para>
606 <note>Even though this message is listed as a warning, it causes &amcheck; to exit with a non-zero status.</note>
611 <variablelist remap='TP'>
613 <term>Holding disk <emphasis remap='I'>disk</emphasis>: <emphasis remap='I'>N</emphasis> KB disk space available, that's plenty.</term>
616 There was sufficient free space on holding disk
617 <emphasis remap='I'>disk</emphasis>.</para>
621 <term>WARNING: holding disk <emphasis remap='I'>disk</emphasis>: only <emphasis remap='I'>F</emphasis> KB free, using nothing</term>
625 <emphasis remap='I'>disk</emphasis>
627 <emphasis remap='I'>F</emphasis>
628 KBytes of free space, but that is not enough for what is requested in
629 <emphasis remap='I'>amanda.conf</emphasis>.</para>
633 <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>
637 <emphasis remap='I'>disk</emphasis>
639 <emphasis remap='I'>F</emphasis>
640 KBytes of free space and &A; will be using up to
641 <emphasis remap='I'>U</emphasis>
646 <term>WARNING: if a tape changer is not available, runtapes must be set to 1.</term>
650 <emphasis remap='B'>runtapes</emphasis>
651 <emphasis remap='I'>amanda.conf</emphasis>
652 option must be set to 1 if the
653 <emphasis remap='B'>tpchanger</emphasis>
654 <emphasis remap='I'>amanda.conf</emphasis>
655 option is not set.</para>
659 <term>ERROR: <emphasis remap='I'>error message</emphasis>.</term>
662 An error was detected while initializing the tape changer.</para>
666 <term>ERROR: <emphasis remap='I'>tape device</emphasis>: <emphasis remap='I'>error message</emphasis>.</term>
669 An error was detected while processing the tape label.</para>
673 <term>ERROR: cannot overwrite active tape <emphasis remap='I'>label</emphasis>.</term>
677 <emphasis remap='I'>label</emphasis>
678 is still active and cannot be used.</para>
682 <term>ERROR: label <emphasis remap='I'>label</emphasis> doesn't match labelstr <emphasis remap='I'>pattern</emphasis> .</term>
686 <emphasis remap='I'>label</emphasis>
688 <emphasis remap='B'>labelstr</emphasis>
689 <emphasis remap='I'>amanda.conf</emphasis>
694 <term>(expecting a new tape)</term>
697 The tape is not OK and a new tape was expected.</para>
701 <term>(expecting tape <emphasis remap='I'>label</emphasis> or a new tape)</term>
704 The tape is not OK and either tape
705 <emphasis remap='I'>label</emphasis>
706 or a new tape was expected.</para>
710 <term>ERROR: tape <emphasis remap='I'>label</emphasis> label ok, but is not writable.</term>
714 <emphasis remap='I'>label</emphasis>
715 is OK, but the write enable test failed.</para>
719 <term>Tape <emphasis remap='I'>label</emphasis> is writable.</term>
723 <emphasis remap='I'>label</emphasis>
724 is OK and the write enable test succeeded.</para>
728 <term>NOTE: skipping tape-writable test.</term>
731 The tape write test (see the
733 option) was not enabled.</para>
737 <term>WARNING: skipping tape test because amdump or amflush seem to be running</term>
738 <term>WARNING: if they are not, you must run amcleanup</term>
742 <command>amcheck</command>
744 <emphasis remap='B'>amdump</emphasis>
746 <emphasis remap='B'>amflush</emphasis>
747 were running because a log file or amdump file exists.
748 If they are not running, you probably need to run
749 <emphasis remap='B'>amcleanup</emphasis>
750 to clear up a previous failure.
751 Otherwise, you need to wait until they complete before running
752 <command>amcheck</command><literal>.</literal></para>
756 <term>NOTE: skipping tape checks</term>
759 The tape tests are being skipped because you used the
761 command line option.</para>
765 <term>WARNING: <emphasis remap='I'>compress</emphasis> is not executable, server-compression and indexing will not work</term>
769 <emphasis remap='I'>compress</emphasis>
771 so compression on the tape server host and creating index files will not work.</para>
775 <term>Tape <emphasis remap='I'>label</emphasis> label ok.</term>
779 <emphasis remap='I'>label</emphasis>
785 <term>Server check took <emphasis remap='I'>S</emphasis> seconds.</term>
788 Reports how long the tape server host checks took.</para>
792 <term>ERROR: <emphasis remap='I'>host</emphasis>: could not resolve hostname</term>
795 Could not look up client hostname
796 <emphasis remap='I'>host</emphasis>.</para>
800 <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>
803 Reports the number of client hosts checked,
804 how long it took and the number of errors detected.</para>
808 <term>WARNING: <emphasis remap='I'>host</emphasis>: selfcheck request timed out. Host down?</term>
811 There was no response from
812 <emphasis remap='I'>host</emphasis>
813 when trying to do the client checks.
814 The host might really be down or it might not be configured properly.</para>
818 <term>ERROR: <emphasis remap='I'>host</emphasis> NAK: <emphasis remap='I'>message</emphasis></term>
821 <emphasis remap='I'>Host</emphasis>
822 reported a negative acknowledgment error of
823 <emphasis remap='I'>message</emphasis>
824 to the status check request.</para>
828 <term>ERROR: <emphasis remap='I'>host</emphasis> NAK: [NAK parse failed]</term>
831 <emphasis remap='B'>Amcheck</emphasis>
832 could not parse the negative acknowledgment error from
833 <emphasis remap='I'>host</emphasis>.
834 There might be an &A; version mismatch between the host running
835 <command>amcheck</command>
837 <emphasis remap='I'>host</emphasis>.</para>
841 <term>ERROR: <emphasis remap='I'>host</emphasis> [mutual-authentication failed]</term>
844 Kerberos authentication failed while contacting
845 <emphasis remap='I'>host</emphasis>.</para>
849 <term>ERROR: <emphasis remap='I'>host</emphasis>: <emphasis remap='I'>message</emphasis></term>
853 <emphasis remap='I'>message</emphasis>
854 was reported by the status check on
855 <emphasis remap='I'>host</emphasis>.</para>
861 <refsect1><title>AUTHOR</title>
862 <para>James da Silva, &email.jds; : Original text</para>
863 <para>&maintainer.sgw;: XML-conversion</para>
866 <refsect1><title>SEE ALSO</title>
867 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
868 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>