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"
5 <!-- entities files to use -->
6 <!ENTITY % global_entities SYSTEM 'global.entities'>
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amadmin.8'>
15 <refentrytitle>amadmin</refentrytitle>
16 <manvolnum>8</manvolnum>
22 <refname>amadmin</refname>
23 <refpurpose>administrative interface to control Amanda backups</refpurpose>
29 <!-- body begins here -->
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>
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>
52 <manref name="amanda" vol="8"/>
53 man page for more details about Amanda.</para>
56 <refsect1><title>OPTIONS</title>
57 <variablelist remap='TP'>
59 <term><option>--version</option></term>
60 <listitem><para>Print the version and exit.</para></listitem>
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>
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>
73 <term><option>--exact-match</option></term>
74 <listitem><para>The host and disk are parsed as exact values</para></listitem>
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>
89 <variablelist remap='TP'>
91 <term><emphasis remap='B'>version</emphasis></term>
93 <para>Show the current version and some compile time and runtime parameters.
95 <emphasis remap='I'>config</emphasis>
96 parameter must be present but is ignored.</para>
100 <term><emphasis remap='B'>estimate</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
102 <para>Print the server estimate for the dles, each output lines have the following format:</para>
104 hostname diskname level size
106 <variablelist remap='TP'>
108 <term>hostname</term>
109 <listitem>The quoted hostname
113 <term>diskname</term>
114 <listitem>The quoted diskname
119 <listitem>The level of the estimate
124 <listitem>The estimate size in kbytes
131 <term><emphasis remap='B'>force-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
134 <emphasis remap='I'>disks</emphasis>
136 <emphasis remap='I'>hostname</emphasis>
137 to bump to a new incremental level during the next Amanda run.</para>
141 <term><emphasis remap='B'>force-no-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
144 <emphasis remap='I'>disks</emphasis>
146 <emphasis remap='I'>hostname</emphasis>
147 to not bump to a new incremental level during the next Amanda run.</para>
151 <term><emphasis remap='B'>unforce-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
153 <para>Undo a previous
154 <emphasis remap='B'>force-bump</emphasis>
156 <emphasis remap='B'>force-no-bump</emphasis>
161 <term><emphasis remap='B'>force</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
164 <emphasis remap='I'>disks</emphasis>
166 <emphasis remap='I'>hostname</emphasis>
167 to do a full (level 0) backup during the next Amanda run.</para>
171 <term><emphasis remap='B'>unforce</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
173 <para>Undo a previous
174 <emphasis remap='B'>force</emphasis>
179 <term><emphasis remap='B'>reuse</emphasis> <emphasis remap='I'>tapelabel</emphasis> [ ... ]</term>
181 <para>The tapes listed
182 will be available for reuse at their point in the tape cycle.</para>
186 <term><emphasis remap='B'>no-reuse</emphasis> <emphasis remap='I'>tapelabel</emphasis> [ ... ]</term>
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>
200 <term><emphasis remap='B'>due</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
202 <para>Show when the next full dump is due.</para>
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>
208 <para>Display all backups currently on tape or in the holding disk.
209 The tape label or holding disk filename,
211 and status are displayed.</para>
212 <para>The <option>--sort</option> option changes the sort order using the following flags:
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>
224 <para>An uppercase letter reverses the sort order for that key.
225 The default sort order is <emphasis remap='B'>hkdlpbfw</emphasis>.</para>
230 <term><emphasis remap='B'>holding delete</emphasis> <emphasis remap="I">hostname</emphasis> [ <emphasis remap="I">disk</emphasis> [ <emphasis remap="I">datestamp</emphasis> [ .. ] ] ]</term>
233 <para>Delete holding files matching the given specification. At least
234 a hostname must be provided.</para>
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>
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>
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>
263 <term><emphasis remap='B'>delete</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
265 <para>Delete the specified
266 <emphasis remap='I'>disks</emphasis>
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>
277 <term><emphasis remap='B'>tape</emphasis></term>
279 <para>Display the tape(s) Amanda expects to write to during the next run.
281 <manref name="amcheck" vol="8"/>.</para>
285 <term><emphasis remap='B'>bumpsize</emphasis></term>
287 <para>Display the current bump threshold parameters, calculated for all backup
292 <term><emphasis remap='B'>balance</emphasis> [ <option>--days</option> <replaceable><num></replaceable> ]<emphasis remap='B'></emphasis> <emphasis remap='I'></emphasis> <emphasis remap='I'></emphasis></term>
294 <para>Display the distribution of full backups throughout the dump schedule.</para>
298 <term><emphasis remap='B'>export</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
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>
306 <term><emphasis remap='B'>import</emphasis></term>
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>
315 <term><emphasis remap='B'>disklist</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
317 <para>Display the &disklist;
318 information for each of the
319 <emphasis remap='I'>disks</emphasis>
321 <emphasis remap='I'>hostname</emphasis>
323 Mostly used for debugging.</para>
327 <term><emphasis remap='B'>hosts</emphasis></term>
329 <para>Output a list of distinct hosts in the &disklist;, one per line, for easy use in shell scripts.</para>
333 <term><emphasis remap='B'>dles</emphasis></term>
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>
339 <term><emphasis remap='B'>info</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
342 database record for each of the
343 <emphasis remap='I'>disks</emphasis>
345 <emphasis remap='I'>hostname</emphasis>
347 Mostly used for debugging.</para>
351 &configoverride.varlistentry;
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>
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.
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>
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.
380 <para>Undo the previous
381 <emphasis remap='B'>force</emphasis>
383 <filename>/home</filename>
385 <emphasis remap='I'>machine-b</emphasis>.
386 The other file systems will still get a full level 0 backup.</para>
389 $ amadmin daily unforce machine-b /home
390 amadmin: force command for machine-b:/home cleared.
393 <para>Locate backup images of
394 <filename>/var</filename>
396 <emphasis remap='I'>machine-c</emphasis>.
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.
408 <emphasis remap='I'>status</emphasis>
409 column tells you whether the backup was successful or had
410 some type of error.</para>
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
427 <para>Forget about the
428 <filename>/workspace</filename>
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>
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.
440 <para>Find the next tape Amanda will use (in this case, <literal>123456</literal>).</para>
444 The next Amanda run should go onto tape 123456 or a new tape.
447 <para>Show how well full backups are balanced across the dump cycle.
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>
455 <emphasis remap='I'>out KB</emphasis>
456 show the estimated total size of the backups
457 before and after any compression, respectively.</para>
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>
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>
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)
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"/>,