Imported Upstream version 3.2.0
[debian/amanda] / man / xml-source / amadmin.8.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM 'global.entities'>
7   %global_entities;
8 ]>
9
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amadmin.8'>
12
13
14 <refmeta>
15 <refentrytitle>amadmin</refentrytitle>
16 <manvolnum>8</manvolnum>
17 &rmi.source;
18 &rmi.version;
19 &rmi.manual.8;
20 </refmeta>
21 <refnamediv>
22 <refname>amadmin</refname>
23 <refpurpose>administrative interface to control Amanda backups</refpurpose>
24 </refnamediv>
25 <refentryinfo>
26 &author.jds;
27 &author.sgw.xml;
28 </refentryinfo>
29 <!-- body begins here -->
30 <refsynopsisdiv>
31 <cmdsynopsis>
32   <command>amadmin</command>    
33     <arg choice='plain'><replaceable>config</replaceable></arg>
34     <arg choice='plain'><replaceable>command</replaceable></arg>
35     <arg choice='opt' rep='repeat'><replaceable>command_options</replaceable></arg>
36     &configoverride.synopsis;
37 </cmdsynopsis>
38 </refsynopsisdiv>
39
40
41 <refsect1><title>DESCRIPTION</title>
42 <para><emphasis remap='B'>Amadmin</emphasis>
43 performs various administrative tasks on the
44 <emphasis remap='I'>config</emphasis>
45 Amanda configuration.</para>
46
47 <para>See the
48 <manref name="amanda" vol="8"/>
49 man page for more details about Amanda.</para>
50 </refsect1>
51
52 <refsect1><title>COMMANDS</title>
53 <para>Commands that take a <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]
54 parameter pair operate on all disks in the &disklist; for that
55 <emphasis remap='I'>hostname</emphasis> if no disks are specified.  Where
56 <emphasis remap='I'>hostname</emphasis> is also marked as being optional,
57 the command operates on all hosts and disks in the &disklist; when no hostname is given.
58 Both <emphasis remap='I'>hostname</emphasis> and <emphasis remap='I'>disks</emphasis>
59 are match expressions; see <manref name="amanda-match" vol="7"/> for a description.</para>
60
61 <variablelist remap='TP'>
62   <varlistentry>
63   <term><emphasis remap='B'>version</emphasis></term>
64   <listitem>
65 <para>Show the current version and some compile time and runtime parameters.
66 The
67 <emphasis remap='I'>config</emphasis>
68 parameter must be present but is ignored.</para>
69   </listitem>
70   </varlistentry>
71   <varlistentry>
72   <term><emphasis remap='B'>estimate</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
73   <listitem>
74 <para>Print the server estimate for the dles, each output lines have the following format:</para>
75 <programlisting>
76   hostname diskname level size
77 </programlisting>
78 <variablelist remap='TP'>
79 <varlistentry>
80 <term>hostname</term>
81 <listitem>The quoted hostname
82 </listitem>
83 </varlistentry>
84 <varlistentry>
85 <term>diskname</term>
86 <listitem>The quoted diskname
87 </listitem>
88 </varlistentry>
89 <varlistentry>
90 <term>level</term>
91 <listitem>The level of the estimate
92 </listitem>
93 </varlistentry>
94 <varlistentry>
95 <term>size</term>
96 <listitem>The estimate size in kbytes
97 </listitem>
98 </varlistentry>
99 </variablelist>
100   </listitem>
101   </varlistentry>
102   <varlistentry>
103   <term><emphasis remap='B'>force-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
104   <listitem>
105 <para>Force the
106 <emphasis remap='I'>disks</emphasis>
107 on
108 <emphasis remap='I'>hostname</emphasis>
109 to bump to a new incremental level during the next Amanda run.</para>
110   </listitem>
111   </varlistentry>
112   <varlistentry>
113   <term><emphasis remap='B'>force-no-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
114   <listitem>
115 <para>Force the
116 <emphasis remap='I'>disks</emphasis>
117 on
118 <emphasis remap='I'>hostname</emphasis>
119 to not bump to a new incremental level during the next Amanda run.</para>
120   </listitem>
121   </varlistentry>
122   <varlistentry>
123   <term><emphasis remap='B'>unforce-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
124   <listitem>
125 <para>Undo a previous
126 <emphasis remap='B'>force-bump</emphasis>
127 or
128 <emphasis remap='B'>force-no-bump</emphasis>
129 command.</para>
130   </listitem>
131   </varlistentry>
132   <varlistentry>
133   <term><emphasis remap='B'>force</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
134   <listitem>
135 <para>Force the
136 <emphasis remap='I'>disks</emphasis>
137 on
138 <emphasis remap='I'>hostname</emphasis>
139 to do a full (level 0) backup during the next Amanda run.</para>
140   </listitem>
141   </varlistentry>
142   <varlistentry>
143   <term><emphasis remap='B'>unforce</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
144   <listitem>
145 <para>Undo a previous
146 <emphasis remap='B'>force</emphasis>
147 command.</para>
148   </listitem>
149   </varlistentry>
150   <varlistentry>
151   <term><emphasis remap='B'>reuse</emphasis> <emphasis remap='I'>tapelabel</emphasis> [ ... ]</term>
152   <listitem>
153 <para>The tapes listed
154 will be available for reuse at their point in the tape cycle.</para>
155   </listitem>
156   </varlistentry>
157   <varlistentry>
158   <term><emphasis remap='B'>no-reuse</emphasis> <emphasis remap='I'>tapelabel</emphasis> [ ... ]</term>
159   <listitem>
160 <para>The tapes listed
161 will not be reused when their turn comes up again in the tape cycle.
162 Note that if this causes the number of reusable tapes to drop below the
163 <emphasis remap='B'>amanda.conf</emphasis>
164 <emphasis remap='I'>tapecycle</emphasis>
165 value, Amanda will request new tapes until the count is satisfied again.</para>
166 <para>Tape marked <emphasis remap='I'>no-reuse</emphasis> are available
167 for recovery, marking them <emphasis remap='I'>no-reuse</emphasis> is a
168 security to be sure amanda will not overwrite them.</para>
169   </listitem>
170   </varlistentry>
171   <varlistentry>
172   <term><emphasis remap='B'>due</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
173   <listitem>
174 <para>Show when the next full dump is due.</para>
175   </listitem>
176   </varlistentry>
177   <varlistentry>
178   <term><emphasis remap='B'>find</emphasis> [ <option>--sort</option> <replaceable>hkdlpbfw</replaceable> ]<emphasis remap='B'></emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
179   <listitem>
180 <para>Display all backups currently on tape or in the holding disk.
181 The tape label or holding disk filename,
182 file number,
183 and status are displayed.</para>
184 <para>The <option>--sort</option> option changes the sort order using the following flags:
185 <programlisting>
186 <emphasis>h</emphasis>: host name
187 <emphasis>k</emphasis>: disk name
188 <emphasis>d</emphasis>: dump timestamp
189 <emphasis>l</emphasis>: backup level
190 <emphasis>p</emphasis>: dump part
191 <emphasis>b</emphasis>: tape label
192 <emphasis>f</emphasis>: filenum on tape
193 <emphasis>w</emphasis>: write timestamp
194 </programlisting></para>
195
196 <para>An uppercase letter reverses the sort order for that key.
197 The default sort order is <emphasis remap='B'>hkdlpbfw</emphasis>.</para>
198 </listitem>
199 </varlistentry>
200
201   <varlistentry>
202   <term><emphasis remap='B'>holding delete</emphasis> <emphasis remap="I">hostname</emphasis> [ <emphasis remap="I">disk</emphasis> [ <emphasis remap="I">datestamp</emphasis> [ .. ] ] ]</term>
203   <listitem>
204
205     <para>Delete holding files matching the given specification.  At least
206     a hostname must be provided.</para>
207
208   </listitem>
209   </varlistentry>
210
211   <varlistentry>
212   <term><emphasis remap='B'>holding list</emphasis> [-l] [-d] [ <emphasis remap="I">hostname</emphasis> [ <emphasis remap="I">disk</emphasis> [ <emphasis remap="I">datestamp</emphasis> [ .. ] ] ] ]</term>
213   <listitem>
214
215     <para>List holding files matching the given dump specification, or all
216         holding files if no specification is provided.  See <manref
217             name="amanda-match" vol="7"/> for more information on dump
218         specifications.  With '-l', additional information (size, level, and
219         whether the dump is outdated) is provided.  With '-d', only outdated
220         dumps are shown.</para>
221
222     <para>An outdated holding file is one which is not required for a
223     restore of the <emphasis>most recent</emphasis> dump.  Note that
224     outdated dumps may still be required for restores at earlier dates.
225     For example, assume that a DLE had a level 0 on Monday, level
226     1's Tuesday through Thursday, and a level 2 on Friday.  Then the
227     files required for a restore of Fridays (the most recent) dump
228     are those from Monday (level 0), Thursday (level 1), and Friday
229     (level 2).  Tuesday and Wednesday's files are outdated. </para>
230
231   </listitem>
232   </varlistentry>
233
234   <varlistentry>
235   <term><emphasis remap='B'>delete</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
236   <listitem>
237 <para>Delete the specified
238 <emphasis remap='I'>disks</emphasis>
239 on
240 <emphasis remap='I'>hostname</emphasis>
241 from the Amanda database.</para>
242 <note><para>If you do not also remove the disk from the &disklist;
243 file, Amanda will treat it as a new disk during the next run.</para>
244 </note>
245   </listitem>
246   </varlistentry>
247
248   <varlistentry>
249   <term><emphasis remap='B'>tape</emphasis></term>
250   <listitem>
251 <para>Display the tape(s) Amanda expects to write to during the next run.
252 See also
253 <manref name="amcheck" vol="8"/>.</para>
254   </listitem>
255   </varlistentry>
256   <varlistentry>
257   <term><emphasis remap='B'>bumpsize</emphasis></term>
258   <listitem>
259 <para>Display the current bump threshold parameters, calculated for all backup
260 levels.</para>
261   </listitem>
262   </varlistentry>
263   <varlistentry>
264   <term><emphasis remap='B'>balance</emphasis> [ <option>--days</option> <replaceable>&lt;num&gt;</replaceable> ]<emphasis remap='B'></emphasis> <emphasis remap='I'></emphasis> <emphasis remap='I'></emphasis></term>
265   <listitem>
266 <para>Display the distribution of full backups throughout the dump schedule.</para>
267   </listitem>
268   </varlistentry>
269   <varlistentry>
270   <term><emphasis remap='B'>export</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
271   <listitem>
272 <para>Convert records from the Amanda database
273 to a text format that may be transmitted to another Amanda machine and
274 <emphasis remap='B'>import</emphasis>ed.</para>
275   </listitem>
276   </varlistentry>
277   <varlistentry>
278   <term><emphasis remap='B'>import</emphasis></term>
279   <listitem>
280 <para>Convert
281 <emphasis remap='B'>export</emphasis>ed
282 records read from standard input to a form Amanda uses
283 and insert them into the database on this machine.</para>
284   </listitem>
285   </varlistentry>
286   <varlistentry>
287   <term><emphasis remap='B'>disklist</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
288   <listitem>
289 <para>Display the &disklist;
290 information for each of the
291 <emphasis remap='I'>disks</emphasis>
292 on
293 <emphasis remap='I'>hostname</emphasis>
294 (or all hosts).
295 Mostly used for debugging.</para>
296   </listitem>
297   </varlistentry>
298   <varlistentry>
299   <term><emphasis remap='B'>hosts</emphasis></term>
300   <listitem>
301 <para>Output a list of distinct hosts in the &disklist;, one per line, for easy use in shell scripts.</para>
302   </listitem>
303   </varlistentry>
304   <varlistentry>
305   <term><emphasis remap='B'>dles</emphasis></term>
306   <listitem>
307 <para>Output a list of distinct DLEs in the &disklist;, one per line with host and diskname separated by a space, for easy use in shell scripts.</para>
308   </listitem>
309   </varlistentry>
310   <varlistentry>
311   <term><emphasis remap='B'>info</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
312   <listitem>
313 <para>Display the
314 database record for each of the
315 <emphasis remap='I'>disks</emphasis>
316 on
317 <emphasis remap='I'>hostname</emphasis>
318 (or all hosts).
319 Mostly used for debugging.</para>
320   </listitem>
321   </varlistentry>
322
323   &configoverride.varlistentry;
324
325 </variablelist>
326 </refsect1>
327
328 <refsect1><title>EXAMPLES</title>
329 <para>Request three specific file systems on
330 <emphasis remap='I'>machine-a</emphasis>
331 get a full level 0 backup during the next Amanda run.</para>
332
333 <programlisting>
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 </programlisting>
339
340 <para>Request all file systems on
341 <emphasis remap='I'>machine-b</emphasis>
342 get a full level 0 backup during the next Amanda run.</para>
343
344 <programlisting>
345 $ amadmin daily force machine-b
346 amadmin: machine-b:/ is set to a forced level 0 tonight.
347 amadmin: machine-b:/var is set to a forced level 0 tonight.
348 amadmin: machine-b:/usr is set to a forced level 0 tonight.
349 amadmin: machine-b:/home is set to a forced level 0 tonight.
350 </programlisting>
351
352 <para>Undo the previous
353 <emphasis remap='B'>force</emphasis>
354 request for
355 <filename>/home</filename>
356 on
357 <emphasis remap='I'>machine-b</emphasis>.
358 The other file systems will still get a full level 0 backup.</para>
359
360 <programlisting>
361 $ amadmin daily unforce machine-b /home
362 amadmin: force command for machine-b:/home cleared.
363 </programlisting>
364
365 <para>Locate backup images of
366 <filename>/var</filename>
367 from
368 <emphasis remap='I'>machine-c</emphasis>.
369 The
370 <emphasis remap='I'>tape or file</emphasis>
371 column displays either a tape label or a filename depending on whether
372 the image is on tape or is still in the holding disk.
373 If the image is on tape, the
374 <emphasis remap='I'>file</emphasis>
375 column tells you which file on the tape has the image
376 (file number zero is a tape label).
377 This column shows zero and is not meaningful if the image
378 is still in the holding disk.
379 The
380 <emphasis remap='I'>status</emphasis>
381 column tells you whether the backup was successful or had
382 some type of error.</para>
383
384 <programlisting>
385 $ amadmin daily find machine-c /var
386 date        host      disk lv tape or file                 file part  status
387 2000-11-09  machine-c /var  0 000110                       9   --  OK
388 2000-11-08  machine-c /var  2 000109                       2   --  OK
389 2000-11-07  machine-c /var  2 /amanda/20001107/machine-c._var.2  0 OK
390 2000-11-06  machine-c /var  2 000107                       2   --  OK
391 2000-11-05  machine-c /var  2 000106                       3   --  OK
392 2000-11-04  machine-c /var  2 000105                       2   --  OK
393 2000-11-03  machine-c /var  2 000104                       2   --  OK
394 2000-11-02  machine-c /var  2 000103                       2   --  OK
395 2000-11-01  machine-c /var  1 000102                       5   --  OK
396 2000-10-31  machine-c /var  1 000101                       3   --  OK
397 </programlisting>
398
399 <para>Forget about the
400 <filename>/workspace</filename>
401 disk on
402 <emphasis remap='I'>machine-d</emphasis>.
403 If you do not also remove the disk from the &disklist;
404 file, Amanda will treat it as a new disk during the next run.</para>
405
406 <programlisting remap='.nf'>
407 $ amadmin daily delete machine-d /workspace
408 amadmin: machine-d:/workspace deleted from database.
409 amadmin: NOTE: you'll have to remove these from the &disklist; yourself.
410 </programlisting>
411
412 <para>Find the next tape Amanda will use (in this case, <literal>123456</literal>).</para>
413
414 <programlisting>
415 $ amadmin daily tape
416 The next Amanda run should go onto tape 123456 or a new tape.
417 </programlisting>
418
419 <para>Show how well full backups are balanced across the dump cycle.
420 The
421 <emphasis remap='I'>due-date</emphasis>
422 column is the day the backups are due for a full backup.
423 <emphasis remap='I'>#fs</emphasis>
424 shows the number of filesystems doing full backups that night, and
425 <emphasis remap='I'>orig KB</emphasis>
426 and
427 <emphasis remap='I'>out KB</emphasis>
428 show the estimated total size of the backups
429 before and after any compression, respectively.</para>
430
431 <para>The
432 <emphasis remap='I'>balance</emphasis>
433 column shows how far off that night's backups are from the average size
434 (shown at the bottom of the balance column).
435 Amanda tries to keep the backups within +/- 5%,
436 but since the amount of data on each filesystem is always changing,
437 and Amanda will never delay backups just to rebalance the schedule,
438 it is common for the schedule to fluctuate by larger percentages.
439 In particular, in the case of a tape or backup failure, a bump will occur the following night,
440 which will not be smoothed out until the next pass through the schedule.</para>
441
442 <para>The last line also shows an estimate of how many Amanda runs will be
443 made between full backups for a file system.
444 In the example, a file system will probably have a full backup done
445 every eight times Amanda is run (e.g. every eight days).</para>
446
447 <programlisting>
448 $ amadmin daily balance
449  due-date  #fs   orig KB    out KB  balance
450 -------------------------------------------
451 11/10 Mon   21    930389    768753    +5.1%
452 11/11 Tue   29   1236272    733211    +0.2%
453 11/12 Wed   31   1552381    735796    +0.6%
454 11/13 Thu   23   1368447    684552    -6.4%
455 11/14 Fri   32   1065603    758155    +3.6%
456 11/15 Sat   14   1300535    738430    +0.9%
457 11/16 Sun   31   1362696    740365    +1.2%
458 11/17 Mon   30   1427936    773397    +5.7%
459 11/18 Tue   11   1059191    721786    -1.3%
460 11/19 Wed   19   1108737    661867    -9.5%
461 -------------------------------------------
462 TOTAL      241  12412187   7316312   731631  (estimated 8 runs per dumpcycle)
463 </programlisting>
464 </refsect1>
465
466 <seealso>
467 <manref name="amanda" vol="8"/>,
468 <manref name="amcheck" vol="8"/>,
469 <manref name="amdump" vol="8"/>,
470 <manref name="amrestore" vol="8"/>,
471 <manref name="amfetchdump" vol="8"/>
472 <manref name="amanda-match" vol="7"/>,
473 </seealso>
474
475 </refentry>