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 &configoverride.synopsis;
34 <arg choice='plain'><replaceable>config</replaceable></arg>
35 <arg choice='plain'><replaceable>command</replaceable></arg>
36 <arg choice='opt' rep='repeat'><replaceable>command_options</replaceable></arg>
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>
48 <manref name="amanda" vol="8"/>
49 man page for more details about Amanda.</para>
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; when no hostname is given.
58 Both <emphasis remap='I'>hostname</emphasis> and <emphasis remap='I'>disks</emphasis>
59 are match expressions; see <manref name="amanda-match" vol="7"/> for a description.</para>
61 <variablelist remap='TP'>
63 <term><emphasis remap='B'>version</emphasis></term>
65 <para>Show the current version and some compile time and runtime parameters.
67 <emphasis remap='I'>config</emphasis>
68 parameter must be present but is ignored.</para>
72 <term><emphasis remap='B'>estimate</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
74 <para>Print the server estimate for the dles, each output lines have the following format:</para>
76 hostname diskname level size
78 <variablelist remap='TP'>
81 <listitem>The quoted hostname
86 <listitem>The quoted diskname
91 <listitem>The level of the estimate
96 <listitem>The estimate size in kbytes
103 <term><emphasis remap='B'>force-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
106 <emphasis remap='I'>disks</emphasis>
108 <emphasis remap='I'>hostname</emphasis>
109 to bump to a new incremental level during the next Amanda run.</para>
113 <term><emphasis remap='B'>force-no-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
116 <emphasis remap='I'>disks</emphasis>
118 <emphasis remap='I'>hostname</emphasis>
119 to not bump to a new incremental level during the next Amanda run.</para>
123 <term><emphasis remap='B'>unforce-bump</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
125 <para>Undo a previous
126 <emphasis remap='B'>force-bump</emphasis>
128 <emphasis remap='B'>force-no-bump</emphasis>
133 <term><emphasis remap='B'>force</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
136 <emphasis remap='I'>disks</emphasis>
138 <emphasis remap='I'>hostname</emphasis>
139 to do a full (level 0) backup during the next Amanda run.</para>
143 <term><emphasis remap='B'>unforce</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
145 <para>Undo a previous
146 <emphasis remap='B'>force</emphasis>
151 <term><emphasis remap='B'>reuse</emphasis> <emphasis remap='I'>tapelabel</emphasis> [ ... ]</term>
153 <para>The tapes listed
154 will be available for reuse at their point in the tape cycle.</para>
158 <term><emphasis remap='B'>no-reuse</emphasis> <emphasis remap='I'>tapelabel</emphasis> [ ... ]</term>
160 <para>The tapes listed
161 will not be reused when their turn comes up again in the tape cycle.
162 Note that if this causes the number of reusable tapes to drop below the
163 <emphasis remap='B'>amanda.conf</emphasis>
164 <emphasis remap='I'>tapecycle</emphasis>
165 value, Amanda will request new tapes until the count is satisfied again.</para>
166 <para>Tape marked <emphasis remap='I'>no-reuse</emphasis> are available
167 for recovery, marking them <emphasis remap='I'>no-reuse</emphasis> is a
168 security to be sure amanda will not overwrite them.</para>
172 <term><emphasis remap='B'>due</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
174 <para>Show when the next full dump is due.</para>
178 <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>
180 <para>Display all backups currently on tape or in the holding disk.
181 The tape label or holding disk filename,
183 and status are displayed.</para>
184 <para>The <option>--sort</option> option changes the sort order using the following flags:
186 <emphasis>h</emphasis>: host name
187 <emphasis>k</emphasis>: disk name
188 <emphasis>d</emphasis>: dump timestamp
189 <emphasis>l</emphasis>: backup level
190 <emphasis>p</emphasis>: dump part
191 <emphasis>b</emphasis>: tape label
192 <emphasis>f</emphasis>: filenum on tape
193 <emphasis>w</emphasis>: write timestamp
194 </programlisting></para>
196 <para>An uppercase letter reverses the sort order for that key.
197 The default sort order is <emphasis remap='B'>hkdlpbfw</emphasis>.</para>
202 <term><emphasis remap='B'>holding delete</emphasis> <emphasis remap="I">hostname</emphasis> [ <emphasis remap="I">disk</emphasis> [ <emphasis remap="I">datestamp</emphasis> [ .. ] ] ]</term>
205 <para>Delete holding files matching the given specification. At least
206 a hostname must be provided.</para>
212 <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>
215 <para>List holding files matching the given dump specification, or all
216 holding files if no specification is provided. See <manref
217 name="amanda-match" vol="7"/> for more information on dump
218 specifications. With '-l', additional information (size, level, and
219 whether the dump is outdated) is provided. With '-d', only outdated
220 dumps are shown.</para>
222 <para>An outdated holding file is one which is not required for a
223 restore of the <emphasis>most recent</emphasis> dump. Note that
224 outdated dumps may still be required for restores at earlier dates.
225 For example, assume that a DLE had a level 0 on Monday, level
226 1's Tuesday through Thursday, and a level 2 on Friday. Then the
227 files required for a restore of Fridays (the most recent) dump
228 are those from Monday (level 0), Thursday (level 1), and Friday
229 (level 2). Tuesday and Wednesday's files are outdated. </para>
235 <term><emphasis remap='B'>delete</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]+</term>
237 <para>Delete the specified
238 <emphasis remap='I'>disks</emphasis>
240 <emphasis remap='I'>hostname</emphasis>
241 from the Amanda database.</para>
242 <note><para>If you do not also remove the disk from the &disklist;
243 file, Amanda will treat it as a new disk during the next run.</para>
249 <term><emphasis remap='B'>tape</emphasis></term>
251 <para>Display the tape(s) Amanda expects to write to during the next run.
253 <manref name="amcheck" vol="8"/>.</para>
257 <term><emphasis remap='B'>bumpsize</emphasis></term>
259 <para>Display the current bump threshold parameters, calculated for all backup
264 <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>
266 <para>Display the distribution of full backups throughout the dump schedule.</para>
270 <term><emphasis remap='B'>export</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
272 <para>Convert records from the Amanda database
273 to a text format that may be transmitted to another Amanda machine and
274 <emphasis remap='B'>import</emphasis>ed.</para>
278 <term><emphasis remap='B'>import</emphasis></term>
281 <emphasis remap='B'>export</emphasis>ed
282 records read from standard input to a form Amanda uses
283 and insert them into the database on this machine.</para>
287 <term><emphasis remap='B'>disklist</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
289 <para>Display the &disklist;
290 information for each of the
291 <emphasis remap='I'>disks</emphasis>
293 <emphasis remap='I'>hostname</emphasis>
295 Mostly used for debugging.</para>
299 <term><emphasis remap='B'>hosts</emphasis></term>
301 <para>Output a list of distinct hosts in the &disklist;, one per line, for easy use in shell scripts.</para>
305 <term><emphasis remap='B'>dles</emphasis></term>
307 <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>
311 <term><emphasis remap='B'>info</emphasis> [ <emphasis remap='I'>hostname</emphasis> [ <emphasis remap='I'>disks</emphasis> ]* ]*</term>
314 database record for each of the
315 <emphasis remap='I'>disks</emphasis>
317 <emphasis remap='I'>hostname</emphasis>
319 Mostly used for debugging.</para>
323 &configoverride.varlistentry;
328 <refsect1><title>EXAMPLES</title>
329 <para>Request three specific file systems on
330 <emphasis remap='I'>machine-a</emphasis>
331 get a full level 0 backup during the next Amanda run.</para>
334 $ amadmin daily force machine-a / /var /usr
335 amadmin: machine-a:/ is set to a forced level 0 tonight.
336 amadmin: machine-a:/var is set to a forced level 0 tonight.
337 amadmin: machine-a:/usr is set to a forced level 0 tonight.
340 <para>Request all file systems on
341 <emphasis remap='I'>machine-b</emphasis>
342 get a full level 0 backup during the next Amanda run.</para>
345 $ amadmin daily force machine-b
346 amadmin: machine-b:/ is set to a forced level 0 tonight.
347 amadmin: machine-b:/var is set to a forced level 0 tonight.
348 amadmin: machine-b:/usr is set to a forced level 0 tonight.
349 amadmin: machine-b:/home is set to a forced level 0 tonight.
352 <para>Undo the previous
353 <emphasis remap='B'>force</emphasis>
355 <filename>/home</filename>
357 <emphasis remap='I'>machine-b</emphasis>.
358 The other file systems will still get a full level 0 backup.</para>
361 $ amadmin daily unforce machine-b /home
362 amadmin: force command for machine-b:/home cleared.
365 <para>Locate backup images of
366 <filename>/var</filename>
368 <emphasis remap='I'>machine-c</emphasis>.
370 <emphasis remap='I'>tape or file</emphasis>
371 column displays either a tape label or a filename depending on whether
372 the image is on tape or is still in the holding disk.
373 If the image is on tape, the
374 <emphasis remap='I'>file</emphasis>
375 column tells you which file on the tape has the image
376 (file number zero is a tape label).
377 This column shows zero and is not meaningful if the image
378 is still in the holding disk.
380 <emphasis remap='I'>status</emphasis>
381 column tells you whether the backup was successful or had
382 some type of error.</para>
385 $ amadmin daily find machine-c /var
386 date host disk lv tape or file file part status
387 2000-11-09 machine-c /var 0 000110 9 -- OK
388 2000-11-08 machine-c /var 2 000109 2 -- OK
389 2000-11-07 machine-c /var 2 /amanda/20001107/machine-c._var.2 0 OK
390 2000-11-06 machine-c /var 2 000107 2 -- OK
391 2000-11-05 machine-c /var 2 000106 3 -- OK
392 2000-11-04 machine-c /var 2 000105 2 -- OK
393 2000-11-03 machine-c /var 2 000104 2 -- OK
394 2000-11-02 machine-c /var 2 000103 2 -- OK
395 2000-11-01 machine-c /var 1 000102 5 -- OK
396 2000-10-31 machine-c /var 1 000101 3 -- OK
399 <para>Forget about the
400 <filename>/workspace</filename>
402 <emphasis remap='I'>machine-d</emphasis>.
403 If you do not also remove the disk from the &disklist;
404 file, Amanda will treat it as a new disk during the next run.</para>
406 <programlisting remap='.nf'>
407 $ amadmin daily delete machine-d /workspace
408 amadmin: machine-d:/workspace deleted from database.
409 amadmin: NOTE: you'll have to remove these from the &disklist; yourself.
412 <para>Find the next tape Amanda will use (in this case, <literal>123456</literal>).</para>
416 The next Amanda run should go onto tape 123456 or a new tape.
419 <para>Show how well full backups are balanced across the dump cycle.
421 <emphasis remap='I'>due-date</emphasis>
422 column is the day the backups are due for a full backup.
423 <emphasis remap='I'>#fs</emphasis>
424 shows the number of filesystems doing full backups that night, and
425 <emphasis remap='I'>orig KB</emphasis>
427 <emphasis remap='I'>out KB</emphasis>
428 show the estimated total size of the backups
429 before and after any compression, respectively.</para>
432 <emphasis remap='I'>balance</emphasis>
433 column shows how far off that night's backups are from the average size
434 (shown at the bottom of the balance column).
435 Amanda tries to keep the backups within +/- 5%,
436 but since the amount of data on each filesystem is always changing,
437 and Amanda will never delay backups just to rebalance the schedule,
438 it is common for the schedule to fluctuate by larger percentages.
439 In particular, in the case of a tape or backup failure, a bump will occur the following night,
440 which will not be smoothed out until the next pass through the schedule.</para>
442 <para>The last line also shows an estimate of how many Amanda runs will be
443 made between full backups for a file system.
444 In the example, a file system will probably have a full backup done
445 every eight times Amanda is run (e.g. every eight days).</para>
448 $ amadmin daily balance
449 due-date #fs orig KB out KB balance
450 -------------------------------------------
451 11/10 Mon 21 930389 768753 +5.1%
452 11/11 Tue 29 1236272 733211 +0.2%
453 11/12 Wed 31 1552381 735796 +0.6%
454 11/13 Thu 23 1368447 684552 -6.4%
455 11/14 Fri 32 1065603 758155 +3.6%
456 11/15 Sat 14 1300535 738430 +0.9%
457 11/16 Sun 31 1362696 740365 +1.2%
458 11/17 Mon 30 1427936 773397 +5.7%
459 11/18 Tue 11 1059191 721786 -1.3%
460 11/19 Wed 19 1108737 661867 -9.5%
461 -------------------------------------------
462 TOTAL 241 12412187 7316312 731631 (estimated 8 runs per dumpcycle)
467 <manref name="amanda" vol="8"/>,
468 <manref name="amcheck" vol="8"/>,
469 <manref name="amdump" vol="8"/>,
470 <manref name="amrestore" vol="8"/>,
471 <manref name="amfetchdump" vol="8"/>
472 <manref name="amanda-match" vol="7"/>,