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