Imported Upstream version 3.3.3
[debian/amanda] / man / amadmin.8
1 '\" t
2 .\"     Title: amadmin
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 "AMADMIN" "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 amadmin \- administrative interface to control Amanda backups
32 .SH "SYNOPSIS"
33 .HP \w'\fBamadmin\fR\ 'u
34 \fBamadmin\fR [\-\-version] [\-\-no\-default] [\-\-print\-source] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...]
35 .SH "DESCRIPTION"
36 .PP
37 \fBAmadmin\fR
38 performs various administrative tasks on the
39 \fIconfig\fR
40 Amanda configuration\&.
41 .PP
42 See the
43 \fBamanda\fR(8)
44 man page for more details about Amanda\&.
45 .SH "OPTIONS"
46 .PP
47 \fB\-\-version\fR
48 .RS 4
49 Print the version and exit\&.
50 .RE
51 .PP
52 \fB\-\-no\-default\fR
53 .RS 4
54 Do not print default values for
55 \fBconfig\fR
56 and
57 \fBdisklist\fR
58 commands\&.
59 .RE
60 .PP
61 \fB\-\-print\-source\fR
62 .RS 4
63 Print where a value is defined for
64 \fBconfig\fR
65 and
66 \fBdisklist\fR
67 commands\&.
68 .RE
69 .PP
70 \fB\-\-exact\-match\fR
71 .RS 4
72 The host and disk are parsed as exact values
73 .RE
74 .SH "COMMANDS"
75 .PP
76 Commands that take a
77 \fIhostname\fR
78 [
79 \fIdisks\fR
80 ] parameter pair operate on all disks in the
81 \fBdisklist\fR(5)
82 for that
83 \fIhostname\fR
84 if no disks are specified\&. Where
85 \fIhostname\fR
86 is also marked as being optional, the command operates on all hosts and disks in the
87 \fBdisklist\fR(5)
88 when no hostname is given\&. Both
89 \fIhostname\fR
90 and
91 \fIdisks\fR
92 are match expressions; see
93 \fBamanda-match\fR(7)
94 for a description\&.
95 .PP
96 \fBversion\fR
97 .RS 4
98 Show the current version and some compile time and runtime parameters\&. The
99 \fIconfig\fR
100 parameter must be present but is ignored\&.
101 .RE
102 .PP
103 \fBestimate\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]*
104 .RS 4
105 Print the server estimate for the dles, each output lines have the following format:
106 .nf
107   hostname diskname level size
108 .fi
109 .PP
110 hostname
111 .RS 4
112 The quoted hostname
113 .RE
114 .PP
115 diskname
116 .RS 4
117 The quoted diskname
118 .RE
119 .PP
120 level
121 .RS 4
122 The level of the estimate
123 .RE
124 .PP
125 size
126 .RS 4
127 The estimate size in kbytes
128 .RE
129 .RE
130 .PP
131 \fBforce\-bump\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
132 .RS 4
133 Force the
134 \fIdisks\fR
135 on
136 \fIhostname\fR
137 to bump to a new incremental level during the next Amanda run\&.
138 .RE
139 .PP
140 \fBforce\-no\-bump\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
141 .RS 4
142 Force the
143 \fIdisks\fR
144 on
145 \fIhostname\fR
146 to not bump to a new incremental level during the next Amanda run\&.
147 .RE
148 .PP
149 \fBunforce\-bump\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
150 .RS 4
151 Undo a previous
152 \fBforce\-bump\fR
153 or
154 \fBforce\-no\-bump\fR
155 command\&.
156 .RE
157 .PP
158 \fBforce\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
159 .RS 4
160 Force the
161 \fIdisks\fR
162 on
163 \fIhostname\fR
164 to do a full (level 0) backup during the next Amanda run\&.
165 .RE
166 .PP
167 \fBunforce\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
168 .RS 4
169 Undo a previous
170 \fBforce\fR
171 command\&.
172 .RE
173 .PP
174 \fBreuse\fR \fItapelabel\fR [ \&.\&.\&. ]
175 .RS 4
176 The tapes listed will be available for reuse at their point in the tape cycle\&.
177 .RE
178 .PP
179 \fBno\-reuse\fR \fItapelabel\fR [ \&.\&.\&. ]
180 .RS 4
181 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
182 \fBamanda\&.conf\fR
183 \fItapecycle\fR
184 value, Amanda will request new tapes until the count is satisfied again\&.
185 .sp
186 Tape marked
187 \fIno\-reuse\fR
188 are available for recovery, marking them
189 \fIno\-reuse\fR
190 is a security to be sure amanda will not overwrite them\&.
191 .RE
192 .PP
193 \fBdue\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]*
194 .RS 4
195 Show when the next full dump is due\&.
196 .RE
197 .PP
198 \fBfind\fR [ \fB\-\-sort\fR \fIhkdlpbfw\fR ] [ \fIhostname\fR [ \fIdisks\fR ]* ]*
199 .RS 4
200 Display all backups currently on tape or in the holding disk\&. The tape label or holding disk filename, file number, and status are displayed\&.
201 .sp
202 The
203 \fB\-\-sort\fR
204 option changes the sort order using the following flags:
205 .sp
206 .nf
207 \fIh\fR: host name
208 \fIk\fR: disk name
209 \fId\fR: dump timestamp
210 \fIl\fR: backup level
211 \fIp\fR: dump part
212 \fIb\fR: tape label
213 \fIf\fR: filenum on tape
214 \fIw\fR: write timestamp
215 .fi
216 .sp
217 An uppercase letter reverses the sort order for that key\&. The default sort order is
218 \fBhkdlpbfw\fR\&.
219 .RE
220 .PP
221 \fBholding delete\fR \fIhostname\fR [ \fIdisk\fR [ \fIdatestamp\fR [ \&.\&. ] ] ]
222 .RS 4
223 Delete holding files matching the given specification\&. At least a hostname must be provided\&.
224 .RE
225 .PP
226 \fBholding list\fR [\-l] [\-d] [ \fIhostname\fR [ \fIdisk\fR [ \fIdatestamp\fR [ \&.\&. ] ] ] ]
227 .RS 4
228 List holding files matching the given dump specification, or all holding files if no specification is provided\&. See
229 \fBamanda-match\fR(7)
230 for more information on dump specifications\&. With \*(Aq\-l\*(Aq, additional information (size, level, and whether the dump is outdated) is provided\&. With \*(Aq\-d\*(Aq, only outdated dumps are shown\&.
231 .sp
232 An outdated holding file is one which is not required for a restore of the
233 \fImost recent\fR
234 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\*(Aqs 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\*(Aqs files are outdated\&.
235 .RE
236 .PP
237 \fBdelete\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+
238 .RS 4
239 Delete the specified
240 \fIdisks\fR
241 on
242 \fIhostname\fR
243 from the Amanda database\&.
244 .if n \{\
245 .sp
246 .\}
247 .RS 4
248 .it 1 an-trap
249 .nr an-no-space-flag 1
250 .nr an-break-flag 1
251 .br
252 .ps +1
253 \fBNote\fR
254 .ps -1
255 .br
256 If you do not also remove the disk from the
257 \fBdisklist\fR(5)
258 file, Amanda will treat it as a new disk during the next run\&.
259 .sp .5v
260 .RE
261 .RE
262 .PP
263 \fBtape\fR
264 .RS 4
265 Display the tape(s) Amanda expects to write to during the next run\&. See also
266 \fBamcheck\fR(8)\&.
267 .RE
268 .PP
269 \fBbumpsize\fR
270 .RS 4
271 Display the current bump threshold parameters, calculated for all backup levels\&.
272 .RE
273 .PP
274 \fBbalance\fR [ \fB\-\-days\fR \fI<num>\fR ]
275 .RS 4
276 Display the distribution of full backups throughout the dump schedule\&.
277 .RE
278 .PP
279 \fBexport\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]*
280 .RS 4
281 Convert records from the Amanda database to a text format that may be transmitted to another Amanda machine and
282 \fBimport\fRed\&.
283 .RE
284 .PP
285 \fBimport\fR
286 .RS 4
287 Convert
288 \fBexport\fRed records read from standard input to a form Amanda uses and insert them into the database on this machine\&.
289 .RE
290 .PP
291 \fBdisklist\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]*
292 .RS 4
293 Display the
294 \fBdisklist\fR(5)
295 information for each of the
296 \fIdisks\fR
297 on
298 \fIhostname\fR
299 (or all hosts)\&. Mostly used for debugging\&.
300 .RE
301 .PP
302 \fBhosts\fR
303 .RS 4
304 Output a list of distinct hosts in the
305 \fBdisklist\fR(5), one per line, for easy use in shell scripts\&.
306 .RE
307 .PP
308 \fBdles\fR
309 .RS 4
310 Output a list of distinct DLEs in the
311 \fBdisklist\fR(5), one per line with host and diskname separated by a space, for easy use in shell scripts\&.
312 .RE
313 .PP
314 \fBinfo\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]*
315 .RS 4
316 Display the database record for each of the
317 \fIdisks\fR
318 on
319 \fIhostname\fR
320 (or all hosts)\&. Mostly used for debugging\&.
321 .RE
322 .PP
323 \fB\-o \fR\fB\fIconfigoption\fR\fR
324 .RS 4
325 See the "CONFIGURATION OVERRIDE" section in
326 \fBamanda\fR(8)\&.
327 .RE
328 .SH "EXAMPLES"
329 .PP
330 Request three specific file systems on
331 \fImachine\-a\fR
332 get a full level 0 backup during the next Amanda run\&.
333 .nf
334 $ amadmin daily force machine\-a / /var /usr
335 amadmin: machine\-a:/ is set to a forced level 0 tonight\&.
336 amadmin: machine\-a:/var is set to a forced level 0 tonight\&.
337 amadmin: machine\-a:/usr is set to a forced level 0 tonight\&.
338 .fi
339 .PP
340 Request all file systems on
341 \fImachine\-b\fR
342 get a full level 0 backup during the next Amanda run\&.
343 .nf
344 $ amadmin daily force machine\-b
345 amadmin: machine\-b:/ is set to a forced level 0 tonight\&.
346 amadmin: machine\-b:/var is set to a forced level 0 tonight\&.
347 amadmin: machine\-b:/usr is set to a forced level 0 tonight\&.
348 amadmin: machine\-b:/home is set to a forced level 0 tonight\&.
349 .fi
350 .PP
351 Undo the previous
352 \fBforce\fR
353 request for
354 /home
355 on
356 \fImachine\-b\fR\&. The other file systems will still get a full level 0 backup\&.
357 .nf
358 $ amadmin daily unforce machine\-b /home
359 amadmin: force command for machine\-b:/home cleared\&.
360 .fi
361 .PP
362 Locate backup images of
363 /var
364 from
365 \fImachine\-c\fR\&. The
366 \fItape or file\fR
367 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
368 \fIfile\fR
369 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
370 \fIstatus\fR
371 column tells you whether the backup was successful or had some type of error\&.
372 .nf
373 $ amadmin daily find machine\-c /var
374 date        host      disk lv tape or file                 file part  status
375 2000\-11\-09  machine\-c /var  0 000110                       9   \-\-  OK
376 2000\-11\-08  machine\-c /var  2 000109                       2   \-\-  OK
377 2000\-11\-07  machine\-c /var  2 /amanda/20001107/machine\-c\&._var\&.2  0 OK
378 2000\-11\-06  machine\-c /var  2 000107                       2   \-\-  OK
379 2000\-11\-05  machine\-c /var  2 000106                       3   \-\-  OK
380 2000\-11\-04  machine\-c /var  2 000105                       2   \-\-  OK
381 2000\-11\-03  machine\-c /var  2 000104                       2   \-\-  OK
382 2000\-11\-02  machine\-c /var  2 000103                       2   \-\-  OK
383 2000\-11\-01  machine\-c /var  1 000102                       5   \-\-  OK
384 2000\-10\-31  machine\-c /var  1 000101                       3   \-\-  OK
385 .fi
386 .PP
387 Forget about the
388 /workspace
389 disk on
390 \fImachine\-d\fR\&. If you do not also remove the disk from the
391 \fBdisklist\fR(5)
392 file, Amanda will treat it as a new disk during the next run\&.
393 .nf
394 $ amadmin daily delete machine\-d /workspace
395 amadmin: machine\-d:/workspace deleted from database\&.
396 amadmin: NOTE: you\*(Aqll have to remove these from the \fBdisklist\fR(5) yourself\&.
397 .fi
398 .PP
399 Find the next tape Amanda will use (in this case,
400 123456)\&.
401 .nf
402 $ amadmin daily tape
403 The next Amanda run should go onto tape 123456 or a new tape\&.
404 .fi
405 .PP
406 Show how well full backups are balanced across the dump cycle\&. The
407 \fIdue\-date\fR
408 column is the day the backups are due for a full backup\&.
409 \fI#fs\fR
410 shows the number of filesystems doing full backups that night, and
411 \fIorig KB\fR
412 and
413 \fIout KB\fR
414 show the estimated total size of the backups before and after any compression, respectively\&.
415 .PP
416 The
417 \fIbalance\fR
418 column shows how far off that night\*(Aqs backups are from the average size (shown at the bottom of the balance column)\&. Amanda tries to keep the backups within +/\- 5%, but since the amount of data on each filesystem is always changing, and Amanda 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\&.
419 .PP
420 The last line also shows an estimate of how many Amanda 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 Amanda is run (e\&.g\&. every eight days)\&.
421 .nf
422 $ amadmin daily balance
423  due\-date  #fs   orig KB    out KB  balance
424 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
425 11/10 Mon   21    930389    768753    +5\&.1%
426 11/11 Tue   29   1236272    733211    +0\&.2%
427 11/12 Wed   31   1552381    735796    +0\&.6%
428 11/13 Thu   23   1368447    684552    \-6\&.4%
429 11/14 Fri   32   1065603    758155    +3\&.6%
430 11/15 Sat   14   1300535    738430    +0\&.9%
431 11/16 Sun   31   1362696    740365    +1\&.2%
432 11/17 Mon   30   1427936    773397    +5\&.7%
433 11/18 Tue   11   1059191    721786    \-1\&.3%
434 11/19 Wed   19   1108737    661867    \-9\&.5%
435 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
436 TOTAL      241  12412187   7316312   731631  (estimated 8 runs per dumpcycle)
437 .fi
438 .SH "SEE ALSO"
439 .PP
440 \fBamanda\fR(8),
441 \fBamanda\fR(8),
442 \fBamcheck\fR(8),
443 \fBamdump\fR(8),
444 \fBamrestore\fR(8),
445 \fBamfetchdump\fR(8),
446 \fBamanda-match\fR(7)
447 .PP
448 The Amanda Wiki:
449 : http://wiki.zmanda.com/
450 .SH "AUTHORS"
451 .PP
452 \fBJames da Silva\fR <\&jds@amanda\&.org\&>
453 .PP
454 \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>