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