f56d6337e4b34fbad26b7832a8f6b6ac7c3407ed
[debian/amanda] / man / xml-source / amreport.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='amreport.8'>
12
13 <refmeta>
14 <refentrytitle>amreport</refentrytitle>
15 <manvolnum>8</manvolnum>
16 &rmi.source;
17 &rmi.version;
18 &rmi.manual.8;
19 </refmeta>
20 <refnamediv>
21 <refname>amreport</refname>
22 <refpurpose>generate a formatted output of statistics for an Amanda run</refpurpose>
23 </refnamediv>
24 <refentryinfo>
25 &author.sgw.xml;
26 </refentryinfo>
27 <!-- body begins here -->
28 <refsynopsisdiv>
29 <cmdsynopsis>
30   <command>amreport</command>    
31     <arg choice='opt'><replaceable>config</replaceable></arg>
32     &configoverride.synopsis;
33     <group>
34         <synopfragmentref linkend="cmdline">command-line options</synopfragmentref> | <synopfragmentref linkend="script">script options</synopfragmentref>
35     </group>
36   <synopfragment id="cmdline">
37     <arg choice='opt'>--log=<replaceable>logfile</replaceable></arg>
38     <arg choice='opt'>--ps=<replaceable>filename</replaceable></arg>
39     <arg choice='opt'>--text=<replaceable>filename</replaceable></arg>
40     <arg choice='opt'>--xml=<replaceable>filename</replaceable></arg>
41     <arg choice='opt'>--print=<replaceable>printer</replaceable></arg>
42     <arg choice='opt'>--mail-text=<replaceable>recipient</replaceable></arg>
43   </synopfragment>
44   <synopfragment id="script">
45     <arg choice='opt'>-i</arg>
46     <arg choice='opt'>-M <replaceable>address</replaceable></arg>
47     <arg choice='opt'>-l <replaceable>logfile</replaceable></arg>
48     <arg choice='opt'>-f <replaceable>outputfile</replaceable></arg>
49     <arg choice='opt'>-p <replaceable>postscriptfile</replaceable></arg>
50     <arg choice='opt'>--from-amdump</arg>
51   </synopfragment>
52 </cmdsynopsis>
53 </refsynopsisdiv>
54
55
56 <refsect1><title>DESCRIPTION</title>
57
58 <para><emphasis remap='B'>Amreport</emphasis> generates a summary report of an
59 Amanda backup run.  </para>
60
61 <para>See the <manref name="amanda" vol="8"/> man page for more details about
62 Amanda.</para>
63
64 </refsect1>
65
66 <refsect1><title>OPTIONS</title>
67
68 <variablelist remap='TP'>
69   <varlistentry>
70   <term><emphasis remap='I'>config</emphasis></term>
71   <listitem>
72 <para>Name of the configuration to process.  If no configuration name is
73 specified, amanda.conf is read from the current directory.</para>
74   </listitem>
75   </varlistentry>
76   &configoverride.varlistentry;
77 </variablelist>
78
79 <para>Amreport operates in two distinct modes.  Command-line mode is intended for use
80 by an administrator from the command line, and uses long command-line options
81 for clarity.  Script mode is intended for use from scripts such as amdump, and
82 has a lot of non-obvious default behaviors to suit that need.</para>
83
84 <para>Unless a script-mode option is given, amreport defaults to command-line mode.
85 If no options are given, amreport writes a report for the most recent logfile to
86 stdout.</para>
87
88 <refsect2><title>Command-Line Mode Options</title>
89 <variablelist remap='TP'>
90   <varlistentry>
91   <term><option>--log=<replaceable>logfile</replaceable></option></term>
92   <listitem>
93 <para>Use this logfile as the basis for the report.  If this option is given, then
94 the report is a "historical" report and will not include current state from
95 e.g., holding disk and curinfo.  If this option is not specified, then the
96 most recent logfile will be used.</para>
97   </listitem>
98   </varlistentry>
99   <varlistentry>
100   <term><option>--ps=<replaceable>filename</replaceable></option></term>
101   <listitem>
102 <para>Write a postscript label to <replaceable>filename</replaceable>.
103 See "LABEL PRINTING" below.  If filename is not specified, then the
104 label is written to stdout.</para>
105   </listitem>
106   </varlistentry>
107   <varlistentry>
108   <term><option>--text=<replaceable>filename</replaceable></option></term>
109   <listitem>
110 <para>Write a human-readable text report to <replaceable>filename</replaceable>.
111 If filename is not specified, then the report is written to stdout.</para>
112   </listitem>
113   </varlistentry>
114   <varlistentry>
115   <term><option>--xml=<replaceable>filename</replaceable></option></term>
116   <listitem>
117 <para>Write an XML-formatted report to <replaceable>filename</replaceable>.
118 If filename is not specified, then the report is written to stdout.</para>
119   </listitem>
120   </varlistentry>
121   <varlistentry>
122   <term><option>--print=<replaceable>printer</replaceable></option></term>
123   <listitem>
124 <para>Pipe a postscript label to <command>lp</command> or <command>lpr</command>,
125 specifying the given <replaceable>printer</replaceable>.  If the printer is
126 not specified, uses the default from the Amanda configuration, or the system
127 default printer.</para>
128   </listitem>
129   </varlistentry>
130   <varlistentry>
131   <term><option>--mail-text=<replaceable>recipient</replaceable></option></term>
132   <listitem>
133 <para>Send a human-readable text report to the given <replaceable>recipient</replaceable> via
134 the mailer specified in the Amanda configuration.  If the recipient is
135 not specified, this uses the <emphasis>mailto</emphasis> from the Amanda configuration.</para>
136   </listitem>
137   </varlistentry>
138 </variablelist>
139 </refsect2>
140
141 <refsect2><title>Script Mode Options</title>
142 <variablelist remap='TP'>
143   <varlistentry>
144   <term><option>-i</option></term>
145   <listitem>
146 <para>Don't email the report.</para>
147   </listitem>
148   </varlistentry>
149   <varlistentry>
150   <term><option>-M</option> <replaceable>address</replaceable></term>
151   <listitem>
152 <para>Mail the report to <emphasis remap='I'>address</emphasis>
153 instead of the <emphasis remap='B'>mailto</emphasis> value from
154 <emphasis remap='I'>amanda.conf</emphasis>.
155 </para>
156   </listitem>
157   </varlistentry>
158   <varlistentry>
159   <term><option>-l</option> <replaceable>logfile</replaceable></term>
160   <listitem>
161 <para>Name of the log file to parse to generate the report.
162 If a log file is not specified, it defaults to the file
163 <filename>$logdir/log</filename>, where
164 <filename>$logdir</filename> is the log directory defined in amanda.conf.</para>
165   </listitem>
166   </varlistentry>
167   <varlistentry>
168   <term><option>-f</option> <replaceable>outputfile</replaceable></term>
169   <listitem>
170 <para>Normally, <command>amreport</command> sends the report via e-mail to the
171 <emphasis remap='I'>mailto</emphasis> user as defined in the amanda.conf
172 file.  If <emphasis remap='I'>outputfile</emphasis> is specified, then the
173 report is put in <emphasis remap='I'>outputfile</emphasis>.</para>
174   </listitem>
175   </varlistentry>
176   <varlistentry>
177   <term><option>-p</option> <replaceable>postscriptfile</replaceable></term>
178   <listitem>
179 <para>Send the postscript output to the file
180 <emphasis remap='I'>postscriptfile</emphasis> instead of to the
181 <manref name="lpr" vol="1"/> command.  This option has an effect only if the
182 <emphasis remap='I'>lbl-templ</emphasis> directive is specified in amanda.conf.</para>
183   </listitem>
184   </varlistentry>
185   <varlistentry>
186   <term><option>--from-amdump</option></term>
187   <listitem>
188   <para>Force script mode.  Has no other effect.</para>
189   </listitem>
190   </varlistentry>
191
192 </variablelist>
193 </refsect2>
194 </refsect1>
195
196 <refsect1><title>LABEL PRINTING</title>
197 <para>Amanda can print postscript labels describing the contents
198 of tape(s) written in a run.
199 The labels are designed to be folded and
200 inserted into the tape case along with the tape or hole punched and put 
201 in a 3-ring binder.
202 Various label templates are provided to
203 format data for different tape sizes.</para>
204
205 <para>The information printed varies slightly between label templates
206 due to size constraints.
207 Labels contain one line for each host/file-system
208 pair and may also contain the file number on the tape,
209 the level of the dump,
210 the original size of the dump
211 and the size of the (possibly compressed) tape file.</para>
212
213 <para>Add the
214 <emphasis remap='I'>lbl-templ</emphasis>
215 parameter to the tapetype definition in amanda.conf to enable labels.
216 If you don't add this line to your
217 tapetype definition,
218 <command>amreport</command>
219 will not print tape labels.</para>
220
221 <para>You may use the
222 <emphasis remap='I'>printer</emphasis>
223 keyword in amanda.conf to print to other than the system default printer.</para>
224
225 </refsect1>
226
227 <refsect1><title>TEMPLATES</title>
228
229 <para>Amanda provides label templates for the following tape types.
230 These are pretty generic labels and should be easy to customize for
231 other tape types or particular site needs.</para>
232
233 <!-- .RS -->
234 <!-- .RS -->
235 <literallayout remap='.nf'>
236 * ExaByte 8mm tapes
237 * DAT 4mm tapes
238 * DLT tapes
239 * 3-ring binder
240 </literallayout> <!-- .fi -->
241
242 <para>The 3-ring binder type is the most generic.
243 It may be used to make a hardcopy log of the tapes.</para>
244 </refsect1>
245
246 <refsect1><title>EXIT CODE</title>
247 The exit code of <command>amreport</command> is the ORed value of:
248 <programlisting>
249  0  = success
250  1  = error
251  2  = a dle give strange message
252  4  = a dle failed
253  8  = Don't know the status of a dle (RESULT_MISSING in the report)
254  16 = tape error or no more tape
255 </programlisting>
256 </refsect1>
257
258 <seealso>
259 <manref name="amflush" vol="8"/>
260 </seealso>
261
262 </refentry>
263