Imported Upstream version 3.3.3
[debian/amanda] / man / xml-source / amflush.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 'global.entities'>
7   %global_entities;
8 ]>
9
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amflush.8'>
12
13 <refmeta>
14 <refentrytitle>amflush</refentrytitle>
15 <manvolnum>8</manvolnum>
16 &rmi.source;
17 &rmi.version;
18 &rmi.manual.8;
19 </refmeta>
20 <refnamediv>
21 <refname>amflush</refname>
22 <refpurpose>flush Amanda backup files from holding disk to tape</refpurpose>
23 </refnamediv>
24 <refentryinfo>
25 &author.jds;
26 &author.sgw.xml;
27 </refentryinfo>
28 <!-- body begins here -->
29 <refsynopsisdiv>
30 <cmdsynopsis>
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>
42     </arg>
43 </cmdsynopsis>
44 </refsynopsisdiv>
45
46
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
52 Amanda clients.
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>
57
58 <para>The command optionally takes a set of DLE specifications
59     (see <manref
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>
62
63 </refsect1>
64
65 <refsect1><title>OPTIONS</title>
66 <variablelist remap='TP'>
67   <varlistentry>
68   <term><option>-b</option></term>
69   <listitem>
70 <para>Run
71 <command>amflush</command>
72 in batch mode. All datestamps are selected unless specified.
73 The flush is started without confirmation.</para>
74   </listitem>
75   </varlistentry>
76   <varlistentry>
77   <term><option>-f</option></term>
78   <listitem>
79 <para>Run
80 <command>amflush</command>
81 in foreground.
82 <emphasis remap='B'>Amflush</emphasis>
83 normally detaches itself from the tty and runs as a background process.
84 With the
85 <option>-f</option>
86 option,
87 <command>amflush</command>
88 stays in the foreground.
89 This is useful if
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>
93   </listitem>
94   </varlistentry>
95   <varlistentry>
96   <term><option>-s</option></term>
97   <listitem>
98 <para>Write log to stdout/stderr instead of the amflush log file. Requires the
99 <option>-f</option>
100 option.</para>
101   </listitem>
102   </varlistentry>
103   <varlistentry>
104   <term><option>-D datestamp</option></term>
105   <listitem>
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>
111   </listitem>
112   </varlistentry>
113
114   <varlistentry>
115   <term><option>--exact-match</option></term>
116   <listitem>
117 <para>The host and disk are parsed as exact values</para>
118   </listitem>
119   </varlistentry>
120
121   <varlistentry>
122   <term><replaceable>host</replaceable> [<replaceable>disk</replaceable>]*</term>
123   <listitem>
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>
126   </listitem>
127   </varlistentry>
128
129
130   &configoverride.varlistentry;
131
132 </variablelist>
133
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 &quot;HOST &amp; DISK EXPRESSION&quot; section of
137 <manref name="amanda" vol="8"/>
138 for a description.</para>
139
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>
149 was run, e.g.
150 <literal>19910215</literal>.</para>
151
152 <para>See the
153 <manref name="amanda" vol="8"/>
154 man page for more details about Amanda.</para>
155 </refsect1>
156
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>
161 configuration.
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>
167
168 <programlisting>
169 % amflush MyConfig
170 Scanning /amanda-hold...
171   20001113: found Amanda directory.
172   20001114: found Amanda directory.
173
174 Multiple Amanda directories, please pick one by letter:
175   A. 20001113
176   B. 20001114
177 Select directories to flush [A..B]: [ALL] all
178
179 Flushing dumps in 20001113, 20001114,
180 today: 20001117
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.
186 </programlisting>
187
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>
190
191 <programlisting>
192 % echo 'amflush -b -f MyConfig &amp;&amp; mt offline' | at now
193 </programlisting>
194 </refsect1>
195
196 <refsect1><title>EXIT CODE</title>
197 The exit code of <command>amflush</command> is the ORed value of:
198 <programlisting>
199  0  = success
200  1  = error
201  4  = a dle failed
202  8  = Don't know the status of a dle (RESULT_MISSING in the report)
203  16 = tape error or no more tape
204 </programlisting>
205 </refsect1>
206
207 <seealso>
208 <manref name="amdump" vol="8"/>
209 <manref name="amanda-match" vol="7"/>
210 </seealso>
211
212 </refentry>
213