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