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