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