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