Imported Upstream version 2.5.1
[debian/amanda] / man / amcheck.8
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "AMCHECK" 8 "" "" ""
21 .SH "NAME"
22 amcheck - run Amanda self-checks
23 .SH "SYNOPSIS"
24 .HP 8
25 \fBamcheck\fR [-am] [-w] [-sclt] [-M \fIaddress\fR]*
26      \fIconfig\fR [\fIhost\fR [\fIdisk\fR]*]*
27      [-o \fIconfigoption\fR]*
28
29 .SH "DESCRIPTION"
30 .PP
31 \fBAmcheck\fR
32 runs a number of self-checks on both the
33 \fBAmanda\fR
34 tape server host and the
35 \fBAmanda\fR
36 client hosts.
37 .PP
38 On the tape server host,
39 \fBamcheck\fR
40 can go through the same tape checking used at the start of the nightly
41 \fBamdump\fR
42 run to verify the correct tape for the next run is mounted.
43 .PP
44 \fBAmcheck\fR
45 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.
46 .PP
47 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.
48 .PP
49 See the
50 \fBamanda\fR(8)
51 man page for more details about
52 \fBAmanda\fR.
53 .SH "OPTIONS"
54 .TP
55 \fB-s\fR
56 Run the tape server local and tape checks (same as
57 \fB-lt\fR).
58 .TP
59 \fB-c\fR
60 Run the client host checks.Multiple specific clients can be checked by specifying the client name.
61 .TP
62 \fB-l\fR
63 Run the local tests (e.g. permissions) on the server host.
64 .TP
65 \fB-t\fR
66 Run the tape tests on the server host.
67 .TP
68 \fB-w\fR
69 Enables a DESTRUCTIVE check for write-protection on the tape (which would otherwise cause the subsequent
70 \fBamdump\fR
71 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.
72 .TP
73 \fB-m\fR
74 Nothing is printed, but mail is sent if any errors are detected. The mail goes to the
75 \fBmailto\fR
76 address specified in the
77 \fBamanda.conf\fR
78 file or the
79 \fBaddress\fR
80 value if
81 \fB-M\fR
82 is set.
83 .TP
84 \fB-a\fR
85 Like
86 \fB-m\fR
87 but the mail is always sent.
88 .TP
89 \fB-M\fR \fIaddress\fR
90 Mail the report to
91 \fBaddress\fR
92 instead of the
93 \fBmailto\fR
94 value from
95 \fBamanda.conf\fR. Implies
96 \fB-m\fR.
97 .TP
98 \fIhost\fR [\fIdisk\fR]*
99 Specify the host and disk on which the command will work.
100 .TP
101 \fB-o\fR \fIconfigoption\fR
102 See the "\fBCONFIGURATION OVERWRITE\fR" section in
103 \fBamanda\fR(8).
104 .PP
105 The default is
106 \fB-cs\fR.
107 .SH "EXAMPLES"
108 .PP
109 In this example, both the tape server and client tests are run. The results are displayed on standard output.
110 .nf
111
112 % amcheck daily
113 \fBAmanda\fR Tape Server Host Check
114 -----------------------------
115 /amanda2/amanda/work: 911475 KB disk space available, that's plenty.
116 NOTE: skipping tape-writable test.
117 Tape VOL10 label ok.
118 Server check took 34.966 seconds.
119
120 \fBAmanda\fR Backup Client Hosts Check
121 --------------------------------
122 WARNING: northstar: selfcheck request timed out.  Host down?
123 WARNING: drinkme: selfcheck request timed out.  Host down?
124 WARNING: scruffy: selfcheck request timed out.  Host down?
125 Client check: 136 hosts checked in 51.945 seconds, 3 problems found.
126
127 (brought to you by \fBAmanda\fR 2.5.0) 
128 .fi
129 .PP
130 In this example, if the line
131 \fBmailto csd-amanda\fR
132 is in
133 \fBamanda.conf\fR, mail will be sent to
134 \fBcsd-amanda\fR
135 if the server check returns an error.
136 .nf
137
138 % amcheck -s -m daily 
139 .fi
140 .SH "MESSAGES"
141 .TP
142 fatal slot \fBslot\fR: \fBerror message\fR
143 (error) The tape changer detected some kind of fatal error while trying to load slot
144 \fBslot\fR.
145 .TP
146 slot \fBslot\fR: \fBerror message\fR
147 (warning) The tape changer detected some kind of non-fatal error (e.g. an empty slot was detected) while trying to load slot
148 \fBslot\fR, or an error was detected trying to read the tape label.
149 .TP
150 slot \fBslot\fR: date \fBYYYYMMDD\fR label \fBlabel\fR (\fBresult\fR)
151 (info) Tape
152 \fBlabel\fR
153 in slot
154 \fBslot\fR
155 was loaded and found to have been last written on
156 \fBYYYYMMDD\fR. If the tape is new, the date field will be an
157 \fBX\fR. The
158 \fBresult\fR
159 may be one of:
160 .RS
161 .TP
162 exact label match
163 This is the expected tape.
164 .TP
165 no match
166 This label does not match the
167 \fBlabelstr\fR
168 pattern in
169 \fBamanda.conf\fR. Tape scanning will continue.
170 .TP
171 active tape
172 This tape is still active and cannot be overwritten. Tape scanning will continue.
173 .TP
174 first labelstr match
175 This tape is the first one that matches the
176 \fBlabelstr\fR
177 pattern in
178 \fBamanda.conf\fR. Tape scanning will continue if necessary.
179 .TP
180 labelstr match
181 This tape is the next one that matches the
182 \fBlabelstr\fR
183 pattern in
184 \fBamanda.conf\fR. Tape scanning will continue.
185 .RE
186 .IP
187 .TP
188 ERROR: cannot look up dump user \fBuser\fR
189 (error) Dump user
190 \fBuser\fR
191 from
192 \fBamanda.conf\fR
193 could not be found in the system password information.
194 .TP
195 ERROR: cannot look up my own uid (\fBuid\fR)
196 (error) User id
197 \fBuid\fR
198 running
199 \fBamcheck\fR
200 could not be found in the system password information.
201 .TP
202 ERROR: running as user \fBrunuser\fR instead of \fBdumpuser\fR
203 (error)
204 \fBAmcheck\fR
205 should be run as the dump user
206 \fBdumpuser\fR
207 from
208 \fBamanda.conf\fR
209 instead of
210 \fBrunuser\fR.
211 .TP
212 ERROR: program dir \fBdirectory\fR: not accessible
213 (error) The directory
214 \fBAmanda\fR
215 expects to find its auxiliary programs in,
216 \fBdirectory\fR, is not accessible.
217 .TP
218 ERROR: program \fBprogram\fR: does not exist
219 (error) Program
220 \fBprogram\fR
221 needed on the tape server could not be found.
222 .TP
223 ERROR: program \fBprogram\fR: not a file
224 (error) Program
225 \fBprogram\fR
226 needed on the tape server exists but is not a file.
227 .TP
228 ERROR: program \fBprogram\fR: not executable
229 (error) Program
230 \fBprogram\fR
231 needed on the tape server exists but is not executable.
232 .TP
233 WARNING: program \fBprogram\fR: not setuid-root
234 (warning) Program
235 \fBprogram\fR
236 needed on the tape server exists but should be owned by user "root" and setuid.
237 .TP
238 ERROR: \fBXXX\fR dir \fBdirectory\fR: not writable
239 (error) Directory
240 \fBdirectory\fR
241 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
242 \fBXXX\fR
243 may be:
244 .RS
245 .TP
246 log
247 for the
248 \fBAmanda\fR
249 log directory (see
250 \fBlogdir\fR
251 in
252 \fBamanda.conf\fR)
253 .TP
254 oldlog
255 for the directory that holds the old log files (see
256 \fBlogdir\fR
257 in
258 \fBamanda.conf\fR)
259 .TP
260 info
261 for an
262 \fBAmanda\fR
263 database information directory (see
264 \fBcurinfo\fR
265 in
266 \fBamanda.conf\fR) or
267 .TP
268 index
269 for an
270 \fBAmanda\fR
271 index directory (see
272 \fBindexdir\fR
273 in
274 \fBamanda.conf\fR)
275 .TP
276 tapelist
277 for the
278 \fBAmanda\fR
279 tapelist directory (see
280 \fBtapelist\fR
281 in
282 \fBamanda.conf\fR)
283 .RE
284 .IP
285 .TP
286 NOTE: \fBXXX\fR dir \fBdirectory\fR: does not exist
287 (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.
288 .TP
289 NOTE: it will be created on the next run
290 (info) This indicates the info directory listed in the previous message will be created on the next run.
291 .TP
292 ERROR: \fBXXX\fR dir \fBname\fR: not a directory
293 (error)
294 \fBAmcheck\fR
295 expected
296 \fBname\fR
297 to be a directory, but it is something else (e.g. file).
298 .TP
299 WARNING: info file \fIfile\fR: does not exist
300 (warning) File
301 \fBfile\fR
302 does not exist in the text format database. Since the parent directories do exist, the file should already have been created.
303 .TP
304 ERROR: info file \fIname\fR: not a file
305 (error)
306 \fBAmcheck\fR
307 expected
308 \fBname\fR
309 to be a file, but it is something else (e.g. file).
310 .TP
311 ERROR: info file \fIfile\fR: not readable
312 (error) The text format database file
313 \fBfile\fR
314 is not readable.
315 .TP
316 ERROR: log file \fIfile\fR: not writable
317 (error) Log file
318 \fBfile\fR
319 (file
320 \fBlog\fR
321 in
322 \fBlogdir\fR
323 from
324 \fBamanda.conf\fR) is either not writable, or cannot be accessed, perhaps because a parent directory does not allow search permission.
325 .TP
326 ERROR: tape list \fBtapelist\fR: not writable
327 (error)
328 \fBAmanda\fR
329 tape list file
330 \fBtapelist\fR
331 (see
332 \fBtapelist\fR
333 in
334 \fBamanda.conf\fR) is not writable or was not found.
335 .TP
336 ERROR: tape list \fBtapelist\fR: parse error
337 (error)
338 \fBAmanda\fR
339 tape list file
340 \fBtapelist\fR
341 (see
342 \fBtapelist\fR
343 in
344 \fBamanda.conf\fR) could not be read or parsed.
345 .TP
346 WARNING: tapedev is /dev/null, dumps will be thrown away
347 (warning) The
348 \fBtapedev\fR
349 parameter in
350 \fBamanda.conf\fR
351 is set to
352 \fI/dev/null\fR
353 and
354 \fBAmanda\fR
355 uses that when debugging to throw all the dump images away.
356 .TP
357 WARNING: hold file \fIfile\fR exists
358 (info) Hold file
359 \fBfile\fR
360 exists and will cause
361 \fBamdump\fR
362 to pause at the beginning until it is removed.
363 .TP
364 ERROR: holding disk \fBdisk\fR: statfs: \fBerror message\fR
365 (error) An error was returned from the
366 \fBstatfs\fR
367 system call on holding disk
368 \fBdisk\fR
369 (maybe because it does not exist).
370 .TP
371 ERROR: holding disk \fBdisk\fR: not writable
372 (error) Holding disk
373 \fBdisk\fR, is not writable, probably because the caller does not have write permission or a parent directory does not allow search permission.
374 .TP
375 WARNING: holding disk \fBdisk\fR: available space unknown \fBN\fR KB requested.
376 (warning)
377 \fBAmcheck\fR
378 could not determine the amount of available space on holding disk
379 \fBdisk\fR
380 to see if there were at least
381 \fBN\fR
382 KBytes available.
383 .TP
384 WARNING: holding disk \fBdisk\fR: only \fBF\fR KB free (\fBR\fR KB requested).
385 (warning)
386 \fBamanda.conf\fR
387 requested
388 \fBR\fR
389 KBytes of free space on holding disk
390 \fBdisk\fR, but only
391 \fBF\fR
392 KBytes were available. 10 MBytes is subtracted for each backup process (see the
393 \fBinparallel\fR\fBamanda.conf\fR
394 option) to allow for unexpected overruns.
395 .sp
396 .it 1 an-trap
397 .nr an-no-space-flag 1
398 .nr an-break-flag 1
399 .br
400 \fBNote\fR
401 Even though this message is listed as a warning, it causes  \fBamcheck\fR to exit with a non-zero status..TP
402 Holding disk \fBdisk\fR: \fBN\fR KB disk space available, that's plenty.
403 (info) There was sufficient free space on holding disk
404 \fBdisk\fR.
405 .TP
406 WARNING: holding disk \fBdisk\fR: only \fBF\fR KB free, using nothing
407 (warning) Holding disk
408 \fBdisk\fR
409 has
410 \fBF\fR
411 KBytes of free space, but that is not enough for what is requested in
412 \fBamanda.conf\fR.
413 .TP
414 Holding disk \fBdisk\fR: \fBF\fR KB disk space available, using \fBU\fR KB
415 (info) Holding disk
416 \fBdisk\fR
417 has
418 \fBF\fR
419 KBytes of free space and
420 \fBAmanda\fR
421 will be using up to
422 \fBU\fR
423 Kbytes.
424 .TP
425 WARNING: if a tape changer is not available, runtapes must be set to 1.
426 (warning) The
427 \fBruntapes\fR\fBamanda.conf\fR
428 option must be set to 1 if the
429 \fBtpchanger\fR\fBamanda.conf\fR
430 option is not set.
431 .TP
432 ERROR: \fBerror message\fR.
433 (error) An error was detected while initializing the tape changer.
434 .TP
435 ERROR: \fBtape device\fR: \fBerror message\fR.
436 (error) An error was detected while processing the tape label.
437 .TP
438 ERROR: cannot overwrite active tape \fBlabel\fR.
439 (error) Tape
440 \fBlabel\fR
441 is still active and cannot be used.
442 .TP
443 ERROR: label \fBlabel\fR doesn't match labelstr \fBpattern\fR .
444 (error) The label on tape
445 \fBlabel\fR
446 does not match the
447 \fBlabelstr\fR\fBamanda.conf\fR
448 option.
449 .TP
450 (expecting a new tape)
451 (info) The tape is not OK and a new tape was expected.
452 .TP
453 (expecting tape \fBlabel\fR or a new tape)
454 (info) The tape is not OK and either tape
455 \fBlabel\fR
456 or a new tape was expected.
457 .TP
458 ERROR: tape \fBlabel\fR label ok, but is not writable.
459 (error) Tape
460 \fBlabel\fR
461 is OK, but the write enable test failed.
462 .TP
463 Tape \fBlabel\fR is writable.
464 (info) Tape
465 \fBlabel\fR
466 is OK and the write enable test succeeded.
467 .TP
468 NOTE: skipping tape-writable test.
469 (info) The tape write test (see the
470 \fB-w\fR
471 option) was not enabled.
472 .TP
473 WARNING: skipping tape test because amdump or amflush seem to be running, WARNING: if they are not, you must run amcleanup
474 (warning) It looked to
475 \fBamcheck\fR
476 like either
477 \fBamdump\fR
478 or
479 \fBamflush\fR
480 were running because a log file or amdump file exists. If they are not running, you probably need to run
481 \fBamcleanup\fR
482 to clear up a previous failure. Otherwise, you need to wait until they complete before running
483 \fBamcheck\fR.
484 .TP
485 NOTE: skipping tape checks
486 (info) The tape tests are being skipped because you used the
487 \fB-t\fR
488 command line option.
489 .TP
490 WARNING: \fBcompress\fR is not executable, server-compression and indexing will not work
491 (warning) Compression program
492 \fBcompress\fR
493 is not executable, so compression on the tape server host and creating index files will not work.
494 .TP
495 Tape \fBlabel\fR label ok.
496 (info) Tape
497 \fBlabel\fR
498 is OK for the next run.
499 .TP
500 Server check took \fBS\fR seconds.
501 (info) Reports how long the tape server host checks took.
502 .TP
503 ERROR: \fBhost\fR: could not resolve hostname
504 (error) Could not look up client hostname
505 \fBhost\fR.
506 .TP
507 Client check: \fBH\fR hosts checked in \fBS\fR seconds, \fBN\fR problems found.
508 (info) Reports the number of client hosts checked, how long it took and the number of errors detected.
509 .TP
510 WARNING: \fBhost\fR: selfcheck request timed out. Host down?
511 (warning) There was no response from
512 \fBhost\fR
513 when trying to do the client checks. The host might really be down or it might not be configured properly.
514 .TP
515 ERROR: \fBhost\fR NAK: \fBmessage\fR
516 (error)
517 \fBHost\fR
518 reported a negative acknowledgment error of
519 \fBmessage\fR
520 to the status check request.
521 .TP
522 ERROR: \fBhost\fR NAK: [NAK parse failed]
523 (error)
524 \fBAmcheck\fR
525 could not parse the negative acknowledgment error from
526 \fBhost\fR. There might be an
527 \fBAmanda\fR
528 version mismatch between the host running
529 \fBamcheck\fR
530 and
531 \fBhost\fR.
532 .TP
533 ERROR: \fBhost\fR [mutual-authentication failed]
534 (error) Kerberos authentication failed while contacting
535 \fBhost\fR.
536 .TP
537 ERROR: \fBhost\fR: \fBmessage\fR
538 (error) Error
539 \fBmessage\fR
540 was reported by the status check on
541 \fBhost\fR.
542 .SH "AUTHOR"
543 .PP
544 James da Silva,
545 <jds@amanda.org>
546 : Original text
547 .PP
548 Stefan G. Weichinger,
549 <sgw@amanda.org>, maintainer of the
550 \fBAmanda\fR-documentation: XML-conversion
551 .SH "SEE ALSO"
552 .PP
553 \fBamanda\fR(8),
554 \fBamdump\fR(8)
555