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