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