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