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 &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>
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>
51 <manref name="amanda" vol="8"/>
52 man page for more details about Amanda.</para>
55 <refsect1><title>OPTIONS</title>
56 <variablelist remap='TP'>
58 <term><option>--version</option></term>
59 <listitem><para>Print the version and exit.</para></listitem>
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>
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>
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>
84 <variablelist remap='TP'>
86 <term><emphasis remap='B'>version</emphasis></term>
88 <para>Show the current version and some compile time and runtime parameters.
90 <emphasis remap='I'>config</emphasis>
91 parameter must be present but is ignored.</para>
95 <term><emphasis remap='B'>estimate</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
97 <para>Print the server estimate for the dles, each output lines have the following format:</para>
99 hostname diskname level size
101 <variablelist remap='TP'>
103 <term>hostname</term>
104 <listitem>The quoted hostname
108 <term>diskname</term>
109 <listitem>The quoted diskname
114 <listitem>The level of the estimate
119 <listitem>The estimate size in kbytes
126 <term><emphasis remap='B'>force-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
129 <emphasis remap='I'>disks</emphasis>
131 <emphasis remap='I'>hostname</emphasis>
132 to bump to a new incremental level during the next Amanda run.</para>
136 <term><emphasis remap='B'>force-no-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
139 <emphasis remap='I'>disks</emphasis>
141 <emphasis remap='I'>hostname</emphasis>
142 to not bump to a new incremental level during the next Amanda run.</para>
146 <term><emphasis remap='B'>unforce-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
148 <para>Undo a previous
149 <emphasis remap='B'>force-bump</emphasis>
151 <emphasis remap='B'>force-no-bump</emphasis>
156 <term><emphasis remap='B'>force</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
159 <emphasis remap='I'>disks</emphasis>
161 <emphasis remap='I'>hostname</emphasis>
162 to do a full (level 0) backup during the next Amanda run.</para>
166 <term><emphasis remap='B'>unforce</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
168 <para>Undo a previous
169 <emphasis remap='B'>force</emphasis>
174 <term><emphasis remap='B'>reuse</emphasis> <emphasis remap='I'>tapelabel</emphasis> [ ... ]</term>
176 <para>The tapes listed
177 will be available for reuse at their point in the tape cycle.</para>
181 <term><emphasis remap='B'>no-reuse</emphasis> <emphasis remap='I'>tapelabel</emphasis> [ ... ]</term>
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>
195 <term><emphasis remap='B'>due</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
197 <para>Show when the next full dump is due.</para>
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>
203 <para>Display all backups currently on tape or in the holding disk.
204 The tape label or holding disk filename,
206 and status are displayed.</para>
207 <para>The <option>--sort</option> option changes the sort order using the following flags:
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>
219 <para>An uppercase letter reverses the sort order for that key.
220 The default sort order is <emphasis remap='B'>hkdlpbfw</emphasis>.</para>
225 <term><emphasis remap='B'>holding delete</emphasis> <emphasis remap="I">hostname</emphasis> [ <emphasis remap="I">disk</emphasis> [ <emphasis remap="I">datestamp</emphasis> [ .. ] ] ]</term>
228 <para>Delete holding files matching the given specification. At least
229 a hostname must be provided.</para>
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>
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>
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>
258 <term><emphasis remap='B'>delete</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
260 <para>Delete the specified
261 <emphasis remap='I'>disks</emphasis>
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>
272 <term><emphasis remap='B'>tape</emphasis></term>
274 <para>Display the tape(s) Amanda expects to write to during the next run.
276 <manref name="amcheck" vol="8"/>.</para>
280 <term><emphasis remap='B'>bumpsize</emphasis></term>
282 <para>Display the current bump threshold parameters, calculated for all backup
287 <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>
289 <para>Display the distribution of full backups throughout the dump schedule.</para>
293 <term><emphasis remap='B'>export</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
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>
301 <term><emphasis remap='B'>import</emphasis></term>
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>
310 <term><emphasis remap='B'>disklist</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
312 <para>Display the &disklist;
313 information for each of the
314 <emphasis remap='I'>disks</emphasis>
316 <emphasis remap='I'>hostname</emphasis>
318 Mostly used for debugging.</para>
322 <term><emphasis remap='B'>hosts</emphasis></term>
324 <para>Output a list of distinct hosts in the &disklist;, one per line, for easy use in shell scripts.</para>
328 <term><emphasis remap='B'>dles</emphasis></term>
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>
334 <term><emphasis remap='B'>info</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
337 database record for each of the
338 <emphasis remap='I'>disks</emphasis>
340 <emphasis remap='I'>hostname</emphasis>
342 Mostly used for debugging.</para>
346 &configoverride.varlistentry;
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>
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.
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>
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.
375 <para>Undo the previous
376 <emphasis remap='B'>force</emphasis>
378 <filename>/home</filename>
380 <emphasis remap='I'>machine-b</emphasis>.
381 The other file systems will still get a full level 0 backup.</para>
384 $ amadmin daily unforce machine-b /home
385 amadmin: force command for machine-b:/home cleared.
388 <para>Locate backup images of
389 <filename>/var</filename>
391 <emphasis remap='I'>machine-c</emphasis>.
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.
403 <emphasis remap='I'>status</emphasis>
404 column tells you whether the backup was successful or had
405 some type of error.</para>
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
422 <para>Forget about the
423 <filename>/workspace</filename>
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>
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.
435 <para>Find the next tape Amanda will use (in this case, <literal>123456</literal>).</para>
439 The next Amanda run should go onto tape 123456 or a new tape.
442 <para>Show how well full backups are balanced across the dump cycle.
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>
450 <emphasis remap='I'>out KB</emphasis>
451 show the estimated total size of the backups
452 before and after any compression, respectively.</para>
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>
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>
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)
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"/>,