Imported Upstream version 2.6.1
[debian/amanda] / man / amadmin.8
1 .\"     Title: amadmin
2 .\"    Author: James da Silva <jds@amanda.org>
3 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4 .\"      Date: 01/22/2009
5 .\"    Manual: System Administration Commands
6 .\"    Source: Amanda 2.6.1
7 .\"  Language: English
8 .\"
9 .TH "AMADMIN" "8" "01/22/2009" "Amanda 2\&.6\&.1" "System Administration Commands"
10 .\" -----------------------------------------------------------------
11 .\" * (re)Define some macros
12 .\" -----------------------------------------------------------------
13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 .\" toupper - uppercase a string (locale-aware)
15 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 .de toupper
17 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
18 \\$*
19 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
20 ..
21 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" SH-xref - format a cross-reference to an SH section
23 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 .de SH-xref
25 .ie n \{\
26 .\}
27 .toupper \\$*
28 .el \{\
29 \\$*
30 .\}
31 ..
32 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 .\" SH - level-one heading that works better for non-TTY output
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 .de1 SH
36 .\" put an extra blank line of space above the head in non-TTY output
37 .if t \{\
38 .sp 1
39 .\}
40 .sp \\n[PD]u
41 .nr an-level 1
42 .set-an-margin
43 .nr an-prevailing-indent \\n[IN]
44 .fi
45 .in \\n[an-margin]u
46 .ti 0
47 .HTML-TAG ".NH \\n[an-level]"
48 .it 1 an-trap
49 .nr an-no-space-flag 1
50 .nr an-break-flag 1
51 \." make the size of the head bigger
52 .ps +3
53 .ft B
54 .ne (2v + 1u)
55 .ie n \{\
56 .\" if n (TTY output), use uppercase
57 .toupper \\$*
58 .\}
59 .el \{\
60 .nr an-break-flag 0
61 .\" if not n (not TTY), use normal case (not uppercase)
62 \\$1
63 .in \\n[an-margin]u
64 .ti 0
65 .\" if not n (not TTY), put a border/line under subheading
66 .sp -.6
67 \l'\n(.lu'
68 .\}
69 ..
70 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 .\" SS - level-two heading that works better for non-TTY output
72 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 .de1 SS
74 .sp \\n[PD]u
75 .nr an-level 1
76 .set-an-margin
77 .nr an-prevailing-indent \\n[IN]
78 .fi
79 .in \\n[IN]u
80 .ti \\n[SN]u
81 .it 1 an-trap
82 .nr an-no-space-flag 1
83 .nr an-break-flag 1
84 .ps \\n[PS-SS]u
85 \." make the size of the head bigger
86 .ps +2
87 .ft B
88 .ne (2v + 1u)
89 .if \\n[.$] \&\\$*
90 ..
91 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 .\" BB/BE - put background/screen (filled box) around block of text
93 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94 .de BB
95 .if t \{\
96 .sp -.5
97 .br
98 .in +2n
99 .ll -2n
100 .gcolor red
101 .di BX
102 .\}
103 ..
104 .de EB
105 .if t \{\
106 .if "\\$2"adjust-for-leading-newline" \{\
107 .sp -1
108 .\}
109 .br
110 .di
111 .in
112 .ll
113 .gcolor
114 .nr BW \\n(.lu-\\n(.i
115 .nr BH \\n(dn+.5v
116 .ne \\n(BHu+.5v
117 .ie "\\$2"adjust-for-leading-newline" \{\
118 \M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
119 .\}
120 .el \{\
121 \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
122 .\}
123 .in 0
124 .sp -.5v
125 .nf
126 .BX
127 .in
128 .sp .5v
129 .fi
130 .\}
131 ..
132 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 .\" BM/EM - put colored marker in margin next to block of text
134 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 .de BM
136 .if t \{\
137 .br
138 .ll -2n
139 .gcolor red
140 .di BX
141 .\}
142 ..
143 .de EM
144 .if t \{\
145 .br
146 .di
147 .ll
148 .gcolor
149 .nr BH \\n(dn
150 .ne \\n(BHu
151 \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
152 .in 0
153 .nf
154 .BX
155 .in
156 .fi
157 .\}
158 ..
159 .\" -----------------------------------------------------------------
160 .\" * set default formatting
161 .\" -----------------------------------------------------------------
162 .\" disable hyphenation
163 .nh
164 .\" disable justification (adjust text to left margin only)
165 .ad l
166 .\" -----------------------------------------------------------------
167 .\" * MAIN CONTENT STARTS HERE *
168 .\" -----------------------------------------------------------------
169 .SH "Name"
170 amadmin \- administrative interface to control \fIAmanda\fR backups
171 .SH "Synopsis"
172 .fam C
173 .HP \w'\fBamadmin\fR\ 'u
174 \fBamadmin\fR \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...] [\fB\-o\ \fR\fIconfigoption\fR]...
175 .fam
176 .SH "DESCRIPTION"
177 .PP
178 \fBAmadmin\fR
179 performs various administrative tasks on the
180 \fIconfig\fR
181 \fIAmanda\fR
182 configuration\&.
183 .PP
184 See the
185 \fBamanda\fR(8)
186 man page for more details about
187 \fIAmanda\fR\&.
188 .SH "COMMANDS"
189 .PP
190 Commands that take a
191 \fIhostname\fR
192 [
193 \fIdisks\fR
194 ] parameter pair operate on all disks in the
195 \fBdisklist\fR(5)
196 for that
197 \fIhostname\fR
198 if no disks are specified\&. Where
199 \fIhostname\fR
200 is also marked as being optional, the command operates on all hosts and disks in the
201 \fBdisklist\fR(5)\&. Both
202 \fIhostname\fR
203 and
204 \fIdisks\fR
205 are special expressions; see the "HOST & DISK EXPRESSION" section of
206 \fBamanda\fR(8)
207 for a description\&.
208 .PP
209 Commands that take one or more
210 \fIdumpspec\fR
211 parameters operate on the set of dumps specified by all of the expressions\&. See the "DUMP SPECIFICATIONS" section of
212 \fBamanda\fR(8)
213 for a description\&.
214 .PP
215 \fBversion\fR
216 .RS 4
217 Show the current version and some compile time and runtime parameters\&. The
218 \fIconfig\fR
219 parameter must be present but is ignored\&.
220 .RE
221 .PP
222 \fBforce\-bump\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
223 .RS 4
224 Force the
225 \fIdisks\fR
226 on
227 \fIhostname\fR
228 to bump to a new incremental level during the next
229 \fIAmanda\fR
230 run\&.
231 .RE
232 .PP
233 \fBforce\-no\-bump\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
234 .RS 4
235 Force the
236 \fIdisks\fR
237 on
238 \fIhostname\fR
239 to not bump to a new incremental level during the next
240 \fIAmanda\fR
241 run\&.
242 .RE
243 .PP
244 \fBunforce\-bump\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
245 .RS 4
246 Undo a previous
247 \fBforce\-bump\fR
248 or
249 \fBforce\-no\-bump\fR
250 command\&.
251 .RE
252 .PP
253 \fBforce\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
254 .RS 4
255 Force the
256 \fIdisks\fR
257 on
258 \fIhostname\fR
259 to do a full (level 0) backup during the next
260 \fIAmanda\fR
261 run\&.
262 .RE
263 .PP
264 \fBunforce\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
265 .RS 4
266 Undo a previous
267 \fBforce\fR
268 command\&.
269 .RE
270 .PP
271 \fBreuse\fR \fItapelabel\fR [ \&.\&.\&. ]
272 .RS 4
273 The tapes listed will be available for reuse at their point in the tape cycle\&.
274 .RE
275 .PP
276 \fBno\-reuse\fR \fItapelabel\fR [ \&.\&.\&. ]
277 .RS 4
278 The tapes listed will not be reused when their turn comes up again in the tape cycle\&. Note that if this causes the number of reusable tapes to drop below the
279 \fBamanda\&.conf\fR
280 \fItapecycle\fR
281 value,
282 \fIAmanda\fR
283 will request new tapes until the count is satisfied again\&.
284 .sp
285 Tape marked
286 \fIno\-reuse\fR
287 are available for recovery, marking them
288 \fIno\-reuse\fR
289 is a security to be sure amanda will not overwrite them\&.
290 .RE
291 .PP
292 \fBdue\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]*
293 .RS 4
294 Show when the next full dump is due\&.
295 .RE
296 .PP
297 \fBfind\fR [ \fB\-\-sort\fR \fIhkdlpbfw\fR ] [ \fIhostname\fR [ \fIdisks\fR ]* ]*
298 .RS 4
299 Display all backups currently on tape or in the holding disk\&. The tape label or holding disk filename, file number, and status are displayed\&.
300 .sp
301 The
302 \fB\-\-sort\fR
303 option changes the sort order using the following flags:
304 .sp
305 .nf
306 \fIh\fR: host name
307 \fIk\fR: disk name
308 \fId\fR: dump timestamp
309 \fIl\fR: backup level
310 \fIp\fR: dump part
311 \fIb\fR: tape label
312 \fIf\fR: filenum on tape
313 \fIw\fR: write timestamp
314 .fi
315 .sp
316 An uppercase letter reverses the sort order for that key\&. The default sort order is
317 \fBhkdlpbfw\fR\&.
318 .RE
319 .PP
320 \fBholding delete\fR \fIhostname\fR [ \fIdisk\fR [ \fIdatestamp\fR [ \&.\&. ] ] ]
321 .RS 4
322 Delete holding files matching the given specification\&. At least a hostname must be provided\&.
323 .RE
324 .PP
325 \fBholding list\fR [\-l] [\-d] [ \fIhostname\fR [ \fIdisk\fR [ \fIdatestamp\fR [ \&.\&. ] ] ] ]
326 .RS 4
327 List holding files matching the given specification, or all holding files if no specification is provided\&. With \'\-l\', additional information (size, level, and whether the dump is outdated) is provided\&. With \'\-d\', only outdated dumps are shown\&.
328 .sp
329 An outdated holding file is one which is not required for a restore of the
330 \fImost recent\fR
331 dump\&. Note that outdated dumps may still be required for restores at earlier dates\&. For example, assume that a DLE had a level 0 on Monday, level 1\'s Tuesday through Thursday, and a level 2 on Friday\&. Then the files required for a restore of Fridays (the most recent) dump are those from Monday (level 0), Thursday (level 1), and Friday (level 2)\&. Tuesday and Wednesday\'s files are outdated\&.
332 .RE
333 .PP
334 \fBdelete\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
335 .RS 4
336 Delete the specified
337 \fIdisks\fR
338 on
339 \fIhostname\fR
340 from the
341 \fIAmanda\fR
342 database\&.
343 .if n \{\
344 .sp
345 .\}
346 .RS 4
347 .BM yellow
348 .it 1 an-trap
349 .nr an-no-space-flag 1
350 .nr an-break-flag 1
351 .br
352 .ps +1
353 \fBNote\fR
354 .ps -1
355 .br
356 If you do not also remove the disk from the
357 \fBdisklist\fR(5)
358 file,
359 \fIAmanda\fR
360 will treat it as a new disk during the next run\&.
361 .sp .5v
362 .EM yellow
363 .RE
364 .RE
365 .PP
366 \fBtape\fR
367 .RS 4
368 Display the tape(s)
369 \fIAmanda\fR
370 expects to write to during the next run\&. See also
371 \fBamcheck\fR(8)\&.
372 .RE
373 .PP
374 \fBbumpsize\fR
375 .RS 4
376 Display the current bump threshold parameters, calculated for all backup levels\&.
377 .RE
378 .PP
379 \fBbalance\fR [ \fB\-\-days\fR \fI<num>\fR ]
380 .RS 4
381 Display the distribution of full backups throughout the dump schedule\&.
382 .RE
383 .PP
384 \fBexport\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]*
385 .RS 4
386 Convert records from the
387 \fIAmanda\fR
388 database to a text format that may be transmitted to another
389 \fIAmanda\fR
390 machine and
391 \fBimport\fRed\&.
392 .RE
393 .PP
394 \fBimport\fR
395 .RS 4
396 Convert
397 \fBexport\fRed records read from standard input to a form
398 \fIAmanda\fR
399 uses and insert them into the database on this machine\&.
400 .RE
401 .PP
402 \fBdisklist\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]*
403 .RS 4
404 Display the
405 \fBdisklist\fR(5)
406 information for each of the
407 \fIdisks\fR
408 on
409 \fIhostname\fR
410 (or all hosts)\&. Mostly used for debugging\&.
411 .RE
412 .PP
413 \fBinfo\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]*
414 .RS 4
415 Display the database record for each of the
416 \fIdisks\fR
417 on
418 \fIhostname\fR
419 (or all hosts)\&. Mostly used for debugging\&.
420 .RE
421 .PP
422 \fB\-o\fR \fIconfigoption\fR
423 .RS 4
424 See the "\fBCONFIGURATION OVERRIDE\fR" section in
425 \fBamanda\fR(8)\&.
426 .RE
427 .SH "EXAMPLES"
428 .PP
429 Request three specific file systems on
430 \fImachine\-a\fR
431 get a full level 0 backup during the next
432 \fIAmanda\fR
433 run\&.
434 .nf
435 $ amadmin daily force machine\-a / /var /usr
436 amadmin: machine\-a:/ is set to a forced level 0 tonight\&.
437 amadmin: machine\-a:/var is set to a forced level 0 tonight\&.
438 amadmin: machine\-a:/usr is set to a forced level 0 tonight\&.
439 .fi
440 .PP
441 Request all file systems on
442 \fImachine\-b\fR
443 get a full level 0 backup during the next
444 \fIAmanda\fR
445 run\&.
446 .nf
447 $ amadmin daily force machine\-b
448 amadmin: machine\-b:/ is set to a forced level 0 tonight\&.
449 amadmin: machine\-b:/var is set to a forced level 0 tonight\&.
450 amadmin: machine\-b:/usr is set to a forced level 0 tonight\&.
451 amadmin: machine\-b:/home is set to a forced level 0 tonight\&.
452 .fi
453 .PP
454 Undo the previous
455 \fBforce\fR
456 request for
457 \FC/home\F[]
458 on
459 \fImachine\-b\fR\&. The other file systems will still get a full level 0 backup\&.
460 .nf
461 $ amadmin daily unforce machine\-b /home
462 amadmin: force command for machine\-b:/home cleared\&.
463 .fi
464 .PP
465 Locate backup images of
466 \FC/var\F[]
467 from
468 \fImachine\-c\fR\&. The
469 \fItape or file\fR
470 column displays either a tape label or a filename depending on whether the image is on tape or is still in the holding disk\&. If the image is on tape, the
471 \fIfile\fR
472 column tells you which file on the tape has the image (file number zero is a tape label)\&. This column shows zero and is not meaningful if the image is still in the holding disk\&. The
473 \fIstatus\fR
474 column tells you whether the backup was successful or had some type of error\&.
475 .nf
476 $ amadmin daily find machine\-c /var
477 date        host      disk lv tape or file                 file part  status
478 2000\-11\-09  machine\-c /var  0 000110                       9   \-\-  OK
479 2000\-11\-08  machine\-c /var  2 000109                       2   \-\-  OK
480 2000\-11\-07  machine\-c /var  2 /amanda/20001107/machine\-c\&._var\&.2  0 OK
481 2000\-11\-06  machine\-c /var  2 000107                       2   \-\-  OK
482 2000\-11\-05  machine\-c /var  2 000106                       3   \-\-  OK
483 2000\-11\-04  machine\-c /var  2 000105                       2   \-\-  OK
484 2000\-11\-03  machine\-c /var  2 000104                       2   \-\-  OK
485 2000\-11\-02  machine\-c /var  2 000103                       2   \-\-  OK
486 2000\-11\-01  machine\-c /var  1 000102                       5   \-\-  OK
487 2000\-10\-31  machine\-c /var  1 000101                       3   \-\-  OK
488 .fi
489 .PP
490 Forget about the
491 \FC/workspace\F[]
492 disk on
493 \fImachine\-d\fR\&. If you do not also remove the disk from the
494 \fBdisklist\fR(5)
495 file,
496 \fIAmanda\fR
497 will treat it as a new disk during the next run\&.
498 .nf
499 $ amadmin daily delete machine\-d /workspace
500 amadmin: machine\-d:/workspace deleted from database\&.
501 amadmin: NOTE: you\'ll have to remove these from the \fBdisklist\fR(5) yourself\&.
502 .fi
503 .PP
504 Find the next tape
505 \fIAmanda\fR
506 will use (in this case,
507 \FC123456\F[])\&.
508 .nf
509 $ amadmin daily tape
510 The next \fIAmanda\fR run should go onto tape 123456 or a new tape\&.
511 .fi
512 .PP
513 Show how well full backups are balanced across the dump cycle\&. The
514 \fIdue\-date\fR
515 column is the day the backups are due for a full backup\&.
516 \fI#fs\fR
517 shows the number of filesystems doing full backups that night, and
518 \fIorig KB\fR
519 and
520 \fIout KB\fR
521 show the estimated total size of the backups before and after any compression, respectively\&.
522 .PP
523 The
524 \fIbalance\fR
525 column shows how far off that night\'s backups are from the average size (shown at the bottom of the balance column)\&.
526 \fIAmanda\fR
527 tries to keep the backups within +/\- 5%, but since the amount of data on each filesystem is always changing, and
528 \fIAmanda\fR
529 will never delay backups just to rebalance the schedule, it is common for the schedule to fluctuate by larger percentages\&. In particular, in the case of a tape or backup failure, a bump will occur the following night, which will not be smoothed out until the next pass through the schedule\&.
530 .PP
531 The last line also shows an estimate of how many
532 \fIAmanda\fR
533 runs will be made between full backups for a file system\&. In the example, a file system will probably have a full backup done every eight times
534 \fIAmanda\fR
535 is run (e\&.g\&. every eight days)\&.
536 .nf
537 $ amadmin daily balance
538  due\-date  #fs   orig KB    out KB  balance
539 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
540 11/10 Mon   21    930389    768753    +5\&.1%
541 11/11 Tue   29   1236272    733211    +0\&.2%
542 11/12 Wed   31   1552381    735796    +0\&.6%
543 11/13 Thu   23   1368447    684552    \-6\&.4%
544 11/14 Fri   32   1065603    758155    +3\&.6%
545 11/15 Sat   14   1300535    738430    +0\&.9%
546 11/16 Sun   31   1362696    740365    +1\&.2%
547 11/17 Mon   30   1427936    773397    +5\&.7%
548 11/18 Tue   11   1059191    721786    \-1\&.3%
549 11/19 Wed   19   1108737    661867    \-9\&.5%
550 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
551 TOTAL      241  12412187   7316312   731631  (estimated 8 runs per dumpcycle)
552 .fi
553 .SH "FILES"
554 .PP
555 /usr/local/etc/amanda/\fIconfig\fR/amanda\&.conf
556 .SH "SEE ALSO"
557 .PP
558 \fBamanda\fR(8),
559 \fBamcheck\fR(8),
560 \fBamdump\fR(8),
561 \fBamrestore\fR(8),
562 \fBamfetchdump\fR(8),
563 : http://wiki.zmanda.com
564 .SH "Authors"
565 .PP
566 \fBJames da Silva\fR <\&jds@amanda\&.org\&>
567 .PP
568 \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>