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