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