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