Imported Upstream version 2.5.2p1
[debian/amanda] / man / amcheck.8
1 .\"     Title: amcheck
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
4 .\"      Date: 06/06/2007
5 .\"    Manual: 
6 .\"    Source: 
7 .\"
8 .TH "AMCHECK" "8" "06/06/2007" "" ""
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 amcheck \- run Amanda self\-checks
15 .SH "SYNOPSIS"
16 .HP 8
17 \fBamcheck\fR [\-am] [\-w] [\-sclt] [\-M\ \fIaddress\fR] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] [\-o\ \fIconfigoption\fR]...
18 .SH "DESCRIPTION"
19 .PP
20 \fBAmcheck\fR
21 runs a number of self\-checks on both the
22 \fIAmanda\fR
23 tape server host and the
24 \fIAmanda\fR
25 client hosts.
26 .PP
27 On the tape server host,
28 \fBamcheck\fR
29 can go through the same tape checking used at the start of the nightly
30 \fBamdump\fR
31 run to verify the correct tape for the next run is mounted.
32 .PP
33 \fBAmcheck\fR
34 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.
35 .PP
36 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.
37 .PP
38 See the
39 \fBamanda\fR(8)
40 man page for more details about
41 \fIAmanda\fR.
42 .SH "OPTIONS"
43 .PP
44 \fB\-s\fR
45 .RS 4
46 Run the tape server local and tape checks (same as
47 \fB\-lt\fR).
48 .RE
49 .PP
50 \fB\-c\fR
51 .RS 4
52 Run the client host checks. Multiple specific clients can be checked by specifying the client name.
53 .RE
54 .PP
55 \fB\-l\fR
56 .RS 4
57 Run the local tests (e.g. permissions) on the server host.
58 .RE
59 .PP
60 \fB\-t\fR
61 .RS 4
62 Run the tape tests on the server host.
63 .RE
64 .PP
65 \fB\-w\fR
66 .RS 4
67 Enables a DESTRUCTIVE check for write\-protection on the tape (which would otherwise cause the subsequent
68 \fBamdump\fR
69 to fail). If the tape is writable, this check causes all data after the tape label to be erased. If the label_new_tapes 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.
70 .RE
71 .PP
72 \fB\-m\fR
73 .RS 4
74 Nothing is printed, but mail is sent if any errors are detected. The mail goes to the
75 \fBmailto\fR
76 address specified in the
77 \fIamanda.conf\fR
78 file or the
79 \fIaddress\fR
80 value if
81 \fB\-M\fR
82 is set.
83 .RE
84 .PP
85 \fB\-a\fR
86 .RS 4
87 Like
88 \fB\-m\fR
89 but the mail is always sent.
90 .RE
91 .PP
92 \fB\-M\fR \fIaddress\fR
93 .RS 4
94 Mail the report to
95 \fIaddress\fR
96 instead of the
97 \fBmailto\fR
98 value from
99 \fIamanda.conf\fR. Implies
100 \fB\-m\fR.
101 .RE
102 .PP
103 \fIhost\fR [\fIdisk\fR]*
104 .RS 4
105 Specify the host and disk on which the command will work.
106 .RE
107 .PP
108 \fB\-o\fR \fIconfigoption\fR
109 .RS 4
110 See the "\fBCONFIGURATION OVERRIDE\fR" section in
111 \fBamanda\fR(8).
112 .RE
113 .PP
114 The default is
115 \fB\-cs\fR.
116 .SH "EXAMPLES"
117 .PP
118 In this example, both the tape server and client tests are run. The results are displayed on standard output.
119 .sp
120 .RS 4
121 .nf
122 % amcheck daily
123 \fIAmanda\fR Tape Server Host Check
124 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
125 /amanda2/amanda/work: 911475 KB disk space available, that's plenty.
126 NOTE: skipping tape\-writable test.
127 Tape VOL10 label ok.
128 Server check took 34.966 seconds.
129
130 \fIAmanda\fR Backup Client Hosts Check
131 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
132 WARNING: northstar: selfcheck request timed out.  Host down?
133 WARNING: drinkme: selfcheck request timed out.  Host down?
134 WARNING: scruffy: selfcheck request timed out.  Host down?
135 Client check: 136 hosts checked in 51.945 seconds, 3 problems found.
136
137 (brought to you by \fIAmanda\fR 2.5.0) 
138 .fi
139 .RE
140 .PP
141 In this example, if the line
142 \fBmailto csd\-amanda\fR
143 is in
144 \fIamanda.conf\fR, mail will be sent to
145 \fBcsd\-amanda\fR
146 if the server check returns an error.
147 .sp
148 .RS 4
149 .nf
150 % amcheck \-s \-m daily 
151 .fi
152 .RE
153 .SH "MESSAGES"
154 .PP
155 fatal slot \fIslot\fR: \fIerror message\fR
156 .RS 4
157 (error) The tape changer detected some kind of fatal error while trying to load slot
158 \fIslot\fR.
159 .RE
160 .PP
161 slot \fIslot\fR: \fIerror message\fR
162 .RS 4
163 (warning) The tape changer detected some kind of non\-fatal error (e.g. an empty slot was detected) while trying to load slot
164 \fIslot\fR, or an error was detected trying to read the tape label.
165 .RE
166 .PP
167 slot \fIslot\fR: date \fIYYYYMMDD\fR label \fIlabel\fR (\fIresult\fR)
168 .RS 4
169 (info) Tape
170 \fIlabel\fR
171 in slot
172 \fIslot\fR
173 was loaded and found to have been last written on
174 \fIYYYYMMDD\fR. If the tape is new, the date field will be an
175 \fIX\fR. The
176 \fIresult\fR
177 may be one of:
178 .RS 4
179 .PP
180 exact label match
181 .RS 4
182 This is the expected tape.
183 .RE
184 .PP
185 no match
186 .RS 4
187 This label does not match the
188 \fBlabelstr\fR
189 pattern in
190 \fIamanda.conf\fR. Tape scanning will continue.
191 .RE
192 .PP
193 active tape
194 .RS 4
195 This tape is still active and cannot be overwritten. Tape scanning will continue.
196 .RE
197 .PP
198 first labelstr match
199 .RS 4
200 This tape is the first one that matches the
201 \fBlabelstr\fR
202 pattern in
203 \fIamanda.conf\fR. Tape scanning will continue if necessary.
204 .RE
205 .PP
206 labelstr match
207 .RS 4
208 This tape is the next one that matches the
209 \fBlabelstr\fR
210 pattern in
211 \fIamanda.conf\fR. Tape scanning will continue.
212 .RE
213 .RE
214 .IP "" 4
215 .RE
216 .PP
217 ERROR: cannot look up dump user \fIuser\fR
218 .RS 4
219 (error) Dump user
220 \fIuser\fR
221 from
222 \fIamanda.conf\fR
223 could not be found in the system password information.
224 .RE
225 .PP
226 ERROR: cannot look up my own uid (\fIuid\fR)
227 .RS 4
228 (error) User id
229 \fIuid\fR
230 running
231 \fBamcheck\fR
232 could not be found in the system password information.
233 .RE
234 .PP
235 ERROR: running as user \fIrunuser\fR instead of \fIdumpuser\fR
236 .RS 4
237 (error)
238 \fBAmcheck\fR
239 should be run as the dump user
240 \fIdumpuser\fR
241 from
242 \fIamanda.conf\fR
243 instead of
244 \fIrunuser\fR.
245 .RE
246 .PP
247 ERROR: program dir \fIdirectory\fR: not accessible
248 .RS 4
249 (error) The directory
250 \fIAmanda\fR
251 expects to find its auxiliary programs in,
252 \fIdirectory\fR, is not accessible.
253 .RE
254 .PP
255 ERROR: program \fIprogram\fR: does not exist
256 .RS 4
257 (error) Program
258 \fIprogram\fR
259 needed on the tape server could not be found.
260 .RE
261 .PP
262 ERROR: program \fIprogram\fR: not a file
263 .RS 4
264 (error) Program
265 \fIprogram\fR
266 needed on the tape server exists but is not a file.
267 .RE
268 .PP
269 ERROR: program \fIprogram\fR: not executable
270 .RS 4
271 (error) Program
272 \fIprogram\fR
273 needed on the tape server exists but is not executable.
274 .RE
275 .PP
276 WARNING: program \fIprogram\fR: not setuid\-root
277 .RS 4
278 (warning) Program
279 \fIprogram\fR
280 needed on the tape server exists but should be owned by user "root" and setuid.
281 .RE
282 .PP
283 ERROR: \fIXXX\fR dir \fIdirectory\fR: not writable
284 .RS 4
285 (error) Directory
286 \fIdirectory\fR
287 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
288 \fIXXX\fR
289 may be:
290 .RS 4
291 .PP
292 log
293 .RS 4
294 for the
295 \fIAmanda\fR
296 log directory (see
297 \fBlogdir\fR
298 in
299 \fBamanda.conf\fR)
300 .RE
301 .PP
302 oldlog
303 .RS 4
304 for the directory that holds the old log files (see
305 \fBlogdir\fR
306 in
307 \fBamanda.conf\fR)
308 .RE
309 .PP
310 info
311 .RS 4
312 for an
313 \fIAmanda\fR
314 database information directory (see
315 \fBcurinfo\fR
316 in
317 \fBamanda.conf\fR) or
318 .RE
319 .PP
320 index
321 .RS 4
322 for an
323 \fIAmanda\fR
324 index directory (see
325 \fBindexdir\fR
326 in
327 \fBamanda.conf\fR)
328 .RE
329 .PP
330 tapelist
331 .RS 4
332 for the
333 \fIAmanda\fR
334 tapelist directory (see
335 \fBtapelist\fR
336 in
337 \fBamanda.conf\fR)
338 .RE
339 .RE
340 .IP "" 4
341 .RE
342 .PP
343 NOTE: \fIXXX\fR dir \fIdirectory\fR: does not exist
344 .RS 4
345 (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.
346 .RE
347 .PP
348 NOTE: it will be created on the next run
349 .RS 4
350 (info) This indicates the info directory listed in the previous message will be created on the next run.
351 .RE
352 .PP
353 ERROR: \fIXXX\fR dir \fIname\fR: not a directory
354 .RS 4
355 (error)
356 \fBAmcheck\fR
357 expected
358 \fIname\fR
359 to be a directory, but it is something else (e.g. file).
360 .RE
361 .PP
362 WARNING: info file \fIfile\fR: does not exist
363 .RS 4
364 (warning) File
365 \fIfile\fR
366 does not exist in the text format database. Since the parent directories do exist, the file should already have been created.
367 .RE
368 .PP
369 ERROR: info file \fIname\fR: not a file
370 .RS 4
371 (error)
372 \fBAmcheck\fR
373 expected
374 \fIname\fR
375 to be a file, but it is something else (e.g. file).
376 .RE
377 .PP
378 ERROR: info file \fIfile\fR: not readable
379 .RS 4
380 (error) The text format database file
381 \fIfile\fR
382 is not readable.
383 .RE
384 .PP
385 ERROR: log file \fIfile\fR: not writable
386 .RS 4
387 (error) Log file
388 \fIfile\fR
389 (file
390 \fBlog\fR
391 in
392 \fBlogdir\fR
393 from
394 \fBamanda.conf\fR) is either not writable, or cannot be accessed, perhaps because a parent directory does not allow search permission.
395 .RE
396 .PP
397 ERROR: tape list \fItapelist\fR: not writable
398 .RS 4
399 (error)
400 \fIAmanda\fR
401 tape list file
402 \fItapelist\fR
403 (see
404 \fBtapelist\fR
405 in
406 \fBamanda.conf\fR) is not writable or was not found.
407 .RE
408 .PP
409 ERROR: tape list \fItapelist\fR: parse error
410 .RS 4
411 (error)
412 \fIAmanda\fR
413 tape list file
414 \fItapelist\fR
415 (see
416 \fBtapelist\fR
417 in
418 \fBamanda.conf\fR) could not be read or parsed.
419 .RE
420 .PP
421 WARNING: tapedev is /dev/null, dumps will be thrown away
422 .RS 4
423 (warning) The
424 \fBtapedev\fR
425 parameter in
426 \fBamanda.conf\fR
427 is set to
428 \fI/dev/null\fR
429 and
430 \fIAmanda\fR
431 uses that when debugging to throw all the dump images away.
432 .RE
433 .PP
434 WARNING: hold file \fIfile\fR exists
435 .RS 4
436 (info) Hold file
437 \fIfile\fR
438 exists and will cause
439 \fBamdump\fR
440 to pause at the beginning until it is removed.
441 .RE
442 .PP
443 ERROR: holding disk \fIdisk\fR: statfs: \fIerror message\fR
444 .RS 4
445 (error) An error was returned from the
446 \fIstatfs\fR
447 system call on holding disk
448 \fIdisk\fR
449 (maybe because it does not exist).
450 .RE
451 .PP
452 ERROR: holding disk \fIdisk\fR: not writable
453 .RS 4
454 (error) Holding disk
455 \fIdisk\fR, is not writable, probably because the caller does not have write permission or a parent directory does not allow search permission.
456 .RE
457 .PP
458 WARNING: holding disk \fIdisk\fR: available space unknown \fIN\fR KB requested.
459 .RS 4
460 (warning)
461 \fBAmcheck\fR
462 could not determine the amount of available space on holding disk
463 \fIdisk\fR
464 to see if there were at least
465 \fIN\fR
466 KBytes available.
467 .RE
468 .PP
469 WARNING: holding disk \fIdisk\fR: only \fIF\fR KB free (\fIR\fR KB requested).
470 .RS 4
471 (warning)
472 \fIamanda.conf\fR
473 requested
474 \fIR\fR
475 KBytes of free space on holding disk
476 \fIdisk\fR, but only
477 \fIF\fR
478 KBytes were available. 10 MBytes is subtracted for each backup process (see the
479 \fBinparallel\fR
480 \fIamanda.conf\fR
481 option) to allow for unexpected overruns.
482 .sp
483 .it 1 an-trap
484 .nr an-no-space-flag 1
485 .nr an-break-flag 1
486 .br
487 \fBNote\fR
488 Even though this message is listed as a warning, it causes
489 \fBamcheck\fR
490 to exit with a non\-zero status.
491 .RE
492 .PP
493 Holding disk \fIdisk\fR: \fIN\fR KB disk space available, that's plenty.
494 .RS 4
495 (info) There was sufficient free space on holding disk
496 \fIdisk\fR.
497 .RE
498 .PP
499 WARNING: holding disk \fIdisk\fR: only \fIF\fR KB free, using nothing
500 .RS 4
501 (warning) Holding disk
502 \fIdisk\fR
503 has
504 \fIF\fR
505 KBytes of free space, but that is not enough for what is requested in
506 \fIamanda.conf\fR.
507 .RE
508 .PP
509 Holding disk \fIdisk\fR: \fIF\fR KB disk space available, using \fIU\fR KB
510 .RS 4
511 (info) Holding disk
512 \fIdisk\fR
513 has
514 \fIF\fR
515 KBytes of free space and
516 \fIAmanda\fR
517 will be using up to
518 \fIU\fR
519 Kbytes.
520 .RE
521 .PP
522 WARNING: if a tape changer is not available, runtapes must be set to 1.
523 .RS 4
524 (warning) The
525 \fBruntapes\fR
526 \fIamanda.conf\fR
527 option must be set to 1 if the
528 \fBtpchanger\fR
529 \fIamanda.conf\fR
530 option is not set.
531 .RE
532 .PP
533 ERROR: \fIerror message\fR.
534 .RS 4
535 (error) An error was detected while initializing the tape changer.
536 .RE
537 .PP
538 ERROR: \fItape device\fR: \fIerror message\fR.
539 .RS 4
540 (error) An error was detected while processing the tape label.
541 .RE
542 .PP
543 ERROR: cannot overwrite active tape \fIlabel\fR.
544 .RS 4
545 (error) Tape
546 \fIlabel\fR
547 is still active and cannot be used.
548 .RE
549 .PP
550 ERROR: label \fIlabel\fR doesn't match labelstr \fIpattern\fR .
551 .RS 4
552 (error) The label on tape
553 \fIlabel\fR
554 does not match the
555 \fBlabelstr\fR
556 \fIamanda.conf\fR
557 option.
558 .RE
559 .PP
560 (expecting a new tape)
561 .RS 4
562 (info) The tape is not OK and a new tape was expected.
563 .RE
564 .PP
565 (expecting tape \fIlabel\fR or a new tape)
566 .RS 4
567 (info) The tape is not OK and either tape
568 \fIlabel\fR
569 or a new tape was expected.
570 .RE
571 .PP
572 ERROR: tape \fIlabel\fR label ok, but is not writable.
573 .RS 4
574 (error) Tape
575 \fIlabel\fR
576 is OK, but the write enable test failed.
577 .RE
578 .PP
579 Tape \fIlabel\fR is writable.
580 .RS 4
581 (info) Tape
582 \fIlabel\fR
583 is OK and the write enable test succeeded.
584 .RE
585 .PP
586 NOTE: skipping tape\-writable test.
587 .RS 4
588 (info) The tape write test (see the
589 \fB\-w\fR
590 option) was not enabled.
591 .RE
592 .PP
593 WARNING: skipping tape test because amdump or amflush seem to be running, WARNING: if they are not, you must run amcleanup
594 .RS 4
595 (warning) It looked to
596 \fBamcheck\fR
597 like either
598 \fBamdump\fR
599 or
600 \fBamflush\fR
601 were running because a log file or amdump file exists. If they are not running, you probably need to run
602 \fBamcleanup\fR
603 to clear up a previous failure. Otherwise, you need to wait until they complete before running
604 \fBamcheck\fR.
605 .RE
606 .PP
607 NOTE: skipping tape checks
608 .RS 4
609 (info) The tape tests are being skipped because you used the
610 \fB\-t\fR
611 command line option.
612 .RE
613 .PP
614 WARNING: \fIcompress\fR is not executable, server\-compression and indexing will not work
615 .RS 4
616 (warning) Compression program
617 \fIcompress\fR
618 is not executable, so compression on the tape server host and creating index files will not work.
619 .RE
620 .PP
621 Tape \fIlabel\fR label ok.
622 .RS 4
623 (info) Tape
624 \fIlabel\fR
625 is OK for the next run.
626 .RE
627 .PP
628 Server check took \fIS\fR seconds.
629 .RS 4
630 (info) Reports how long the tape server host checks took.
631 .RE
632 .PP
633 ERROR: \fIhost\fR: could not resolve hostname
634 .RS 4
635 (error) Could not look up client hostname
636 \fIhost\fR.
637 .RE
638 .PP
639 Client check: \fIH\fR hosts checked in \fIS\fR seconds, \fIN\fR problems found.
640 .RS 4
641 (info) Reports the number of client hosts checked, how long it took and the number of errors detected.
642 .RE
643 .PP
644 WARNING: \fIhost\fR: selfcheck request timed out. Host down?
645 .RS 4
646 (warning) There was no response from
647 \fIhost\fR
648 when trying to do the client checks. The host might really be down or it might not be configured properly.
649 .RE
650 .PP
651 ERROR: \fIhost\fR NAK: \fImessage\fR
652 .RS 4
653 (error)
654 \fIHost\fR
655 reported a negative acknowledgment error of
656 \fImessage\fR
657 to the status check request.
658 .RE
659 .PP
660 ERROR: \fIhost\fR NAK: [NAK parse failed]
661 .RS 4
662 (error)
663 \fBAmcheck\fR
664 could not parse the negative acknowledgment error from
665 \fIhost\fR. There might be an
666 \fIAmanda\fR
667 version mismatch between the host running
668 \fBamcheck\fR
669 and
670 \fIhost\fR.
671 .RE
672 .PP
673 ERROR: \fIhost\fR [mutual\-authentication failed]
674 .RS 4
675 (error) Kerberos authentication failed while contacting
676 \fIhost\fR.
677 .RE
678 .PP
679 ERROR: \fIhost\fR: \fImessage\fR
680 .RS 4
681 (error) Error
682 \fImessage\fR
683 was reported by the status check on
684 \fIhost\fR.
685 .RE
686 .SH "AUTHOR"
687 .PP
688 James da Silva,
689 <jds@amanda.org>
690 : Original text
691 .PP
692 Stefan G. Weichinger,
693 <sgw@amanda.org>, maintainer of the
694 \fIAmanda\fR\-documentation: XML\-conversion
695 .SH "SEE ALSO"
696 .PP
697 \fBamanda\fR(8),
698 \fBamdump\fR(8)