Imported Upstream version 3.1.0
[debian/amanda] / man / amreport.8
1 '\" t
2 .\"     Title: amreport
3 .\"    Author: Stefan G. Weichinger <sgw@amanda.org>
4 .\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
5 .\"      Date: 06/01/2010
6 .\"    Manual: System Administration Commands
7 .\"    Source: Amanda 3.1.0
8 .\"  Language: English
9 .\"
10 .TH "AMREPORT" "8" "06/01/2010" "Amanda 3\&.1\&.0" "System Administration Commands"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
15 .nh
16 .\" disable justification (adjust text to left margin only)
17 .ad l
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
21 .SH "NAME"
22 amreport \- generate a formatted output of statistics for an Amanda run
23 .SH "SYNOPSIS"
24 .HP \w'\fBamreport\fR\ 'u
25 \fBamreport\fR [\fIconfig\fR] [{\fB\-o\fR\ \fIconfigoption\fR}...] [(1)\ \fIcommand\-line options\fR | (2)\ \fIscript options\fR]
26 .it 1 an-trap
27 .nr an-no-space-flag 1
28 .nr an-break-flag 1
29 .br
30 .HP \w'(1)\ 'u
31 (1)\ [\-\-log=\fIlogfile\fR] [\-\-ps=\fIfilename\fR] [\-\-text=\fIfilename\fR] [\-\-xml=\fIfilename\fR] [\-\-print=\fIprinter\fR] [\-\-mail\-text=\fIrecipient\fR]
32 .HP \w'(2)\ 'u
33 (2)\ [\-i] [\-M\ \fIaddress\fR] [\-l\ \fIlogfile\fR] [\-f\ \fIoutputfile\fR] [\-p\ \fIpostscriptfile\fR] [\-\-from\-amdump]
34 .SH "DESCRIPTION"
35 .PP
36 \fBAmreport\fR
37 generates a summary report of an Amanda backup run\&.
38 .PP
39 See the
40 \fBamanda\fR(8)
41 man page for more details about Amanda\&.
42 .SH "OPTIONS"
43 .PP
44 \fIconfig\fR
45 .RS 4
46 Name of the configuration to process\&. If no configuration name is specified, amanda\&.conf is read from the current directory\&.
47 .RE
48 .PP
49 \fB\-o \fR\fB\fIconfigoption\fR\fR
50 .RS 4
51 See the "CONFIGURATION OVERRIDE" section in
52 \fBamanda\fR(8)\&.
53 .RE
54 .PP
55 Amreport operates in two distinct modes\&. Command\-line mode is intended for use by an administrator from the command line, and uses long command\-line options for clarity\&. Script mode is intended for use from scripts such as amdump, and has a lot of non\-obvious default behaviors to suit that need\&.
56 .PP
57 Unless a script\-mode option is given, amreport defaults to command\-line mode\&. If no options are given, amreport writes a report for the most recent logfile to stdout\&.
58 .SS "Command\-Line Mode Options"
59 .PP
60 \fB\-\-log=\fR\fB\fIlogfile\fR\fR
61 .RS 4
62 Use this logfile as the basis for the report\&. If this option is given, then the report is a "historical" report and will not include current state from e\&.g\&., holding disk and curinfo\&. If this option is not specified, then the most recent logfile will be used\&.
63 .RE
64 .PP
65 \fB\-\-ps=\fR\fB\fIfilename\fR\fR
66 .RS 4
67 Write a postscript label to
68 \fIfilename\fR\&. See "LABEL PRINTING" below\&. If filename is not specified, then the label is written to stdout\&.
69 .RE
70 .PP
71 \fB\-\-text=\fR\fB\fIfilename\fR\fR
72 .RS 4
73 Write a human\-readable text report to
74 \fIfilename\fR\&. If filename is not specified, then the report is written to stdout\&.
75 .RE
76 .PP
77 \fB\-\-xml=\fR\fB\fIfilename\fR\fR
78 .RS 4
79 Write an XML\-formatted report to
80 \fIfilename\fR\&. If filename is not specified, then the report is written to stdout\&.
81 .RE
82 .PP
83 \fB\-\-print=\fR\fB\fIprinter\fR\fR
84 .RS 4
85 Pipe a postscript label to
86 \fBlp\fR
87 or
88 \fBlpr\fR, specifying the given
89 \fIprinter\fR\&. If the printer is not specified, uses the default from the Amanda configuration, or the system default printer\&.
90 .RE
91 .PP
92 \fB\-\-mail\-text=\fR\fB\fIrecipient\fR\fR
93 .RS 4
94 Send a human\-readable text report to the given
95 \fIrecipient\fR
96 via the mailer specified in the Amanda configuration\&. If the recipient is not specified, this uses the
97 \fImailto\fR
98 from the Amanda configuration\&.
99 .RE
100 .SS "Script Mode Options"
101 .PP
102 \fB\-i\fR
103 .RS 4
104 Don\'t email the report\&.
105 .RE
106 .PP
107 \fB\-M\fR \fIaddress\fR
108 .RS 4
109 Mail the report to
110 \fIaddress\fR
111 instead of the
112 \fBmailto\fR
113 value from
114 \fIamanda\&.conf\fR\&.
115 .RE
116 .PP
117 \fB\-l\fR \fIlogfile\fR
118 .RS 4
119 Name of the log file to parse to generate the report\&. If a log file is not specified, it defaults to the file
120 $logdir/log, where
121 $logdir
122 is the log directory defined in amanda\&.conf\&.
123 .RE
124 .PP
125 \fB\-f\fR \fIoutputfile\fR
126 .RS 4
127 Normally,
128 \fBamreport\fR
129 sends the report via e\-mail to the
130 \fImailto\fR
131 user as defined in the amanda\&.conf file\&. If
132 \fIoutputfile\fR
133 is specified, then the report is put in
134 \fIoutputfile\fR\&.
135 .RE
136 .PP
137 \fB\-p\fR \fIpostscriptfile\fR
138 .RS 4
139 Send the postscript output to the file
140 \fIpostscriptfile\fR
141 instead of to the
142 \fBlpr\fR(1)
143 command\&. This option has an effect only if the
144 \fIlbl\-templ\fR
145 directive is specified in amanda\&.conf\&.
146 .RE
147 .PP
148 \fB\-\-from\-amdump\fR
149 .RS 4
150 Force script mode\&. Has no other effect\&.
151 .RE
152 .SH "LABEL PRINTING"
153 .PP
154 Amanda can print postscript labels describing the contents of tape(s) written in a run\&. The labels are designed to be folded and inserted into the tape case along with the tape or hole punched and put in a 3\-ring binder\&. Various label templates are provided to format data for different tape sizes\&.
155 .PP
156 The information printed varies slightly between label templates due to size constraints\&. Labels contain one line for each host/file\-system pair and may also contain the file number on the tape, the level of the dump, the original size of the dump and the size of the (possibly compressed) tape file\&.
157 .PP
158 Add the
159 \fIlbl\-templ\fR
160 parameter to the tapetype definition in amanda\&.conf to enable labels\&. If you don\'t add this line to your tapetype definition,
161 \fBamreport\fR
162 will not print tape labels\&.
163 .PP
164 You may use the
165 \fIprinter\fR
166 keyword in amanda\&.conf to print to other than the system default printer\&.
167 .SH "TEMPLATES"
168 .PP
169 Amanda provides label templates for the following tape types\&. These are pretty generic labels and should be easy to customize for other tape types or particular site needs\&.
170 .sp
171 .if n \{\
172 .RS 4
173 .\}
174 .nf
175 * ExaByte 8mm tapes
176 * DAT 4mm tapes
177 * DLT tapes
178 * 3\-ring binder
179 .fi
180 .if n \{\
181 .RE
182 .\}
183 .PP
184 The 3\-ring binder type is the most generic\&. It may be used to make a hardcopy log of the tapes\&.
185 .SH "EXIT CODE"
186
187 The exit code of \fBamreport\fR is the ORed value of:
188 .nf
189  0  = success
190  1  = error
191  2  = a dle give strange message
192  4  = a dle failed
193  8  = Don\'t know the status of a dle (RESULT_MISSING in the report)
194  16 = tape error or no more tape
195 .fi
196 .SH "SEE ALSO"
197 .PP
198 \fBamanda\fR(8),
199 \fBamflush\fR(8)
200 .PP
201 The Amanda Wiki:
202 : http://wiki.zmanda.com/
203 .SH "AUTHOR"
204 .PP
205 \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>