Imported Upstream version 3.2.0
[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'>-s</arg>
35     <arg choice='opt'>-D <replaceable>datestamp</replaceable></arg>
36     <arg choice='plain'><replaceable>config</replaceable></arg>
37     <arg choice='opt' rep='repeat'>
38        <arg choice='plain'><replaceable>host</replaceable></arg>
39        <arg choice='opt' rep='repeat'><replaceable>disk</replaceable></arg>
40     </arg>
41     &configoverride.synopsis;
42 </cmdsynopsis>
43 </refsynopsisdiv>
44
45
46 <refsect1><title>DESCRIPTION</title>
47 <para><emphasis remap='B'>Amflush</emphasis>
48 writes Amanda backups from the holding disks to tape,
49 and updates the Amanda info database and &tapelist; accordingly.
50 It is similar to amdump, but does not perform any backup operations on
51 Amanda clients.
52 Backups may stay in a holding disk when something is wrong with the tape
53 at the time <command>amdump</command> is run.
54 When this happens, the problem must be corrected and
55 <command>amflush</command> run by hand.</para>
56
57 <para>The command optionally takes a set of DLE specifications
58     (see <manref
59     name="amanda-match" vol="7"/>) to narrow the DLEs for which dumps will be flushed.
60 All dumps in holding are flushed if no expressions are given.</para>
61
62 </refsect1>
63
64 <refsect1><title>OPTIONS</title>
65 <variablelist remap='TP'>
66   <varlistentry>
67   <term><option>-b</option></term>
68   <listitem>
69 <para>Run
70 <command>amflush</command>
71 in batch mode. All datestamps are selected unless specified.
72 The flush is started without confirmation.</para>
73   </listitem>
74   </varlistentry>
75   <varlistentry>
76   <term><option>-f</option></term>
77   <listitem>
78 <para>Run
79 <command>amflush</command>
80 in foreground.
81 <emphasis remap='B'>Amflush</emphasis>
82 normally detaches itself from the tty and runs as a background process.
83 With the
84 <option>-f</option>
85 option,
86 <command>amflush</command>
87 stays in the foreground.
88 This is useful if
89 <command>amflush</command>
90 is run as part of another script that, for example, advances the tape
91 after the flush is completed.</para>
92   </listitem>
93   </varlistentry>
94   <varlistentry>
95   <term><option>-s</option></term>
96   <listitem>
97 <para>Write log to stdout/stderr instead of the amflush log file. Requires the
98 <option>-f</option>
99 option.</para>
100   </listitem>
101   </varlistentry>
102   <varlistentry>
103   <term><option>-D datestamp</option></term>
104   <listitem>
105 <para>specify a datestamp expression you want to flush; see
106 <manref name="amanda-match" vol="7"/>
107 for details on the format of this expression.
108 <option>-D 20001225-7</option>
109 will flush all dumps from 25 december 2000 to 27 december 2000.</para>
110   </listitem>
111   </varlistentry>
112
113   <varlistentry>
114   <term><replaceable>host</replaceable> [<replaceable>disk</replaceable>]*</term>
115   <listitem>
116 <para>Specify the host and disk on which the command will work -- see
117     the description of DLE specifications in <manref name="amanda-match" vol="7"/>. </para>
118   </listitem>
119   </varlistentry>
120
121
122   &configoverride.varlistentry;
123
124 </variablelist>
125
126 <para>You can specify many host/disk expressions, only disks that
127 match an expression will be flushed. All disks are flushed if no
128 expressions are given. see the &quot;HOST &amp; DISK EXPRESSION&quot; section of
129 <manref name="amanda" vol="8"/>
130 for a description.</para>
131
132 <para><emphasis remap='B'>Amflush</emphasis>
133 will look in the holding disks specified by the
134 <emphasis remap='I'>amanda.conf</emphasis>
135 file in /usr/local/etc/amanda/<emphasis remap='I'>config</emphasis>
136 for any non-empty Amanda work directories.
137 It then prompts you to select a directory
138 or to process all of the directories.
139 The work directories in the holding disks are named by the date at the time
140 <emphasis remap='B'>amdump</emphasis>
141 was run, e.g.
142 <literal>19910215</literal>.</para>
143
144 <para>See the
145 <manref name="amanda" vol="8"/>
146 man page for more details about Amanda.</para>
147 </refsect1>
148
149 <refsect1><title>EXAMPLE</title>
150 <para><emphasis remap='B'>Amflush</emphasis>
151 will search for holding areas associated with the
152 <emphasis remap='I'>daily</emphasis>
153 configuration.
154 After you select which holding area to flush,
155 <command>amflush</command>
156 writes the data to tape, updates the databases and sends
157 a mail report similar to
158 <manref name="amdump" vol="8"/>.</para>
159
160 <programlisting>
161 % amflush MyConfig
162 Scanning /amanda-hold...
163   20001113: found Amanda directory.
164   20001114: found Amanda directory.
165
166 Multiple Amanda directories, please pick one by letter:
167   A. 20001113
168   B. 20001114
169 Select directories to flush [A..B]: [ALL] all
170
171 Flushing dumps in 20001113, 20001114,
172 today: 20001117
173 to tape drive /dev/rmt/0mn.
174 Expecting tape DMP014 or a new tape.  (The last dumps were to tape DMP013)
175 Are you sure you want to do this? yes
176 Running in background, you can log off now.
177 You'll get mail when amflush is finished.
178 </programlisting>
179
180 <para>The following example causes amflush to flush everything to tape, then
181 ejects tape, using 'at' to run the task in the background.</para>
182
183 <programlisting>
184 % echo 'amflush -b -f MyConfig &amp;&amp; mt offline' | at now
185 </programlisting>
186 </refsect1>
187
188 <refsect1><title>EXIT CODE</title>
189 The exit code of <command>amflush</command> is the ORed value of:
190 <programlisting>
191  0  = success
192  1  = error
193  4  = a dle failed
194  8  = Don't know the status of a dle (RESULT_MISSING in the report)
195  16 = tape error or no more tape
196 </programlisting>
197 </refsect1>
198
199 <seealso>
200 <manref name="amdump" vol="8"/>
201 <manref name="amanda-match" vol="7"/>
202 </seealso>
203
204 </refentry>
205