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