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