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