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