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='amflush.8'>
14 <refentrytitle>amflush</refentrytitle>
15 <manvolnum>8</manvolnum>
21 <refname>amflush</refname>
22 <refpurpose>flush Amanda backup files from holding disk to tape</refpurpose>
28 <!-- body begins here -->
31 <command>amflush</command>
32 <arg choice='opt'>-b</arg>
33 <arg choice='opt'>-f</arg>
34 <arg choice='opt'>--exact-match</arg>
35 <arg choice='opt'>-s</arg>
36 <arg choice='opt'>-D <replaceable>datestamp</replaceable></arg>
37 &configoverride.synopsis;
38 <arg choice='plain'><replaceable>config</replaceable></arg>
39 <arg choice='opt' rep='repeat'>
40 <arg choice='plain'><replaceable>host</replaceable></arg>
41 <arg choice='opt' rep='repeat'><replaceable>disk</replaceable></arg>
47 <refsect1><title>DESCRIPTION</title>
48 <para><emphasis remap='B'>Amflush</emphasis>
49 writes Amanda backups from the holding disks to tape,
50 and updates the Amanda info database and &tapelist; accordingly.
51 It is similar to amdump, but does not perform any backup operations on
53 Backups may stay in a holding disk when something is wrong with the tape
54 at the time <command>amdump</command> is run.
55 When this happens, the problem must be corrected and
56 <command>amflush</command> run by hand.</para>
58 <para>The command optionally takes a set of DLE specifications
60 name="amanda-match" vol="7"/>) to narrow the DLEs for which dumps will be flushed.
61 All dumps in holding are flushed if no expressions are given.</para>
65 <refsect1><title>OPTIONS</title>
66 <variablelist remap='TP'>
68 <term><option>-b</option></term>
71 <command>amflush</command>
72 in batch mode. All datestamps are selected unless specified.
73 The flush is started without confirmation.</para>
77 <term><option>-f</option></term>
80 <command>amflush</command>
82 <emphasis remap='B'>Amflush</emphasis>
83 normally detaches itself from the tty and runs as a background process.
87 <command>amflush</command>
88 stays in the foreground.
90 <command>amflush</command>
91 is run as part of another script that, for example, advances the tape
92 after the flush is completed.</para>
96 <term><option>-s</option></term>
98 <para>Write log to stdout/stderr instead of the amflush log file. Requires the
104 <term><option>-D datestamp</option></term>
106 <para>specify a datestamp expression you want to flush; see
107 <manref name="amanda-match" vol="7"/>
108 for details on the format of this expression.
109 <option>-D 20001225-7</option>
110 will flush all dumps from 25 december 2000 to 27 december 2000.</para>
115 <term><option>--exact-match</option></term>
117 <para>The host and disk are parsed as exact values</para>
122 <term><replaceable>host</replaceable> [<replaceable>disk</replaceable>]*</term>
124 <para>Specify the host and disk on which the command will work -- see
125 the description of DLE specifications in <manref name="amanda-match" vol="7"/>. </para>
130 &configoverride.varlistentry;
134 <para>You can specify many host/disk expressions, only disks that
135 match an expression will be flushed. All disks are flushed if no
136 expressions are given. see the "HOST & DISK EXPRESSION" section of
137 <manref name="amanda" vol="8"/>
138 for a description.</para>
140 <para><emphasis remap='B'>Amflush</emphasis>
141 will look in the holding disks specified by the
142 <emphasis remap='I'>amanda.conf</emphasis>
143 file in /usr/local/etc/amanda/<emphasis remap='I'>config</emphasis>
144 for any non-empty Amanda work directories.
145 It then prompts you to select a directory
146 or to process all of the directories.
147 The work directories in the holding disks are named by the date at the time
148 <emphasis remap='B'>amdump</emphasis>
150 <literal>19910215</literal>.</para>
153 <manref name="amanda" vol="8"/>
154 man page for more details about Amanda.</para>
157 <refsect1><title>EXAMPLE</title>
158 <para><emphasis remap='B'>Amflush</emphasis>
159 will search for holding areas associated with the
160 <emphasis remap='I'>daily</emphasis>
162 After you select which holding area to flush,
163 <command>amflush</command>
164 writes the data to tape, updates the databases and sends
165 a mail report similar to
166 <manref name="amdump" vol="8"/>.</para>
170 Scanning /amanda-hold...
171 20001113: found Amanda directory.
172 20001114: found Amanda directory.
174 Multiple Amanda directories, please pick one by letter:
177 Select directories to flush [A..B]: [ALL] all
179 Flushing dumps in 20001113, 20001114,
181 to tape drive /dev/rmt/0mn.
182 Expecting tape DMP014 or a new tape. (The last dumps were to tape DMP013)
183 Are you sure you want to do this? yes
184 Running in background, you can log off now.
185 You'll get mail when amflush is finished.
188 <para>The following example causes amflush to flush everything to tape, then
189 ejects tape, using 'at' to run the task in the background.</para>
192 % echo 'amflush -b -f MyConfig && mt offline' | at now
196 <refsect1><title>EXIT CODE</title>
197 The exit code of <command>amflush</command> is the ORed value of:
202 8 = Don't know the status of a dle (RESULT_MISSING in the report)
203 16 = tape error or no more tape
208 <manref name="amdump" vol="8"/>
209 <manref name="amanda-match" vol="7"/>