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