a36d55b25d3f4ac600ac9e809a52ea03f0a3cb6d
[debian/amanda] / man / amflush.8
1 '\" t
2 .\"     Title: amflush
3 .\"    Author: James da Silva <jds@amanda.org>
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 02/21/2012
6 .\"    Manual: System Administration Commands
7 .\"    Source: Amanda 3.3.1
8 .\"  Language: English
9 .\"
10 .TH "AMFLUSH" "8" "02/21/2012" "Amanda 3\&.3\&.1" "System Administration Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 amflush \- flush Amanda backup files from holding disk to tape
32 .SH "SYNOPSIS"
33 .HP \w'\fBamflush\fR\ 'u
34 \fBamflush\fR [\-b] [\-f] [\-s] [\-D\ \fIdatestamp\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
35 .SH "DESCRIPTION"
36 .PP
37 \fBAmflush\fR
38 writes Amanda backups from the holding disks to tape, and updates the Amanda info database and
39 \fBtapelist\fR(5)
40 accordingly\&. It is similar to amdump, but does not perform any backup operations on Amanda clients\&. Backups may stay in a holding disk when something is wrong with the tape at the time
41 \fBamdump\fR
42 is run\&. When this happens, the problem must be corrected and
43 \fBamflush\fR
44 run by hand\&.
45 .PP
46 The command optionally takes a set of DLE specifications (see
47 \fBamanda-match\fR(7)) to narrow the DLEs for which dumps will be flushed\&. All dumps in holding are flushed if no expressions are given\&.
48 .SH "OPTIONS"
49 .PP
50 \fB\-b\fR
51 .RS 4
52 Run
53 \fBamflush\fR
54 in batch mode\&. All datestamps are selected unless specified\&. The flush is started without confirmation\&.
55 .RE
56 .PP
57 \fB\-f\fR
58 .RS 4
59 Run
60 \fBamflush\fR
61 in foreground\&.
62 \fBAmflush\fR
63 normally detaches itself from the tty and runs as a background process\&. With the
64 \fB\-f\fR
65 option,
66 \fBamflush\fR
67 stays in the foreground\&. This is useful if
68 \fBamflush\fR
69 is run as part of another script that, for example, advances the tape after the flush is completed\&.
70 .RE
71 .PP
72 \fB\-s\fR
73 .RS 4
74 Write log to stdout/stderr instead of the amflush log file\&. Requires the
75 \fB\-f\fR
76 option\&.
77 .RE
78 .PP
79 \fB\-D datestamp\fR
80 .RS 4
81 specify a datestamp expression you want to flush; see
82 \fBamanda-match\fR(7)
83 for details on the format of this expression\&.
84 \fB\-D 20001225\-7\fR
85 will flush all dumps from 25 december 2000 to 27 december 2000\&.
86 .RE
87 .PP
88 \fIhost\fR [\fIdisk\fR]*
89 .RS 4
90 Specify the host and disk on which the command will work \-\- see the description of DLE specifications in
91 \fBamanda-match\fR(7)\&.
92 .RE
93 .PP
94 \fB\-o \fR\fB\fIconfigoption\fR\fR
95 .RS 4
96 See the "CONFIGURATION OVERRIDE" section in
97 \fBamanda\fR(8)\&.
98 .RE
99 .PP
100 You can specify many host/disk expressions, only disks that match an expression will be flushed\&. All disks are flushed if no expressions are given\&. see the "HOST & DISK EXPRESSION" section of
101 \fBamanda\fR(8)
102 for a description\&.
103 .PP
104 \fBAmflush\fR
105 will look in the holding disks specified by the
106 \fIamanda\&.conf\fR
107 file in /usr/local/etc/amanda/\fIconfig\fR
108 for any non\-empty Amanda work directories\&. It then prompts you to select a directory or to process all of the directories\&. The work directories in the holding disks are named by the date at the time
109 \fBamdump\fR
110 was run, e\&.g\&.
111 19910215\&.
112 .PP
113 See the
114 \fBamanda\fR(8)
115 man page for more details about Amanda\&.
116 .SH "EXAMPLE"
117 .PP
118 \fBAmflush\fR
119 will search for holding areas associated with the
120 \fIdaily\fR
121 configuration\&. After you select which holding area to flush,
122 \fBamflush\fR
123 writes the data to tape, updates the databases and sends a mail report similar to
124 \fBamdump\fR(8)\&.
125 .nf
126 % amflush MyConfig
127 Scanning /amanda\-hold\&.\&.\&.
128   20001113: found Amanda directory\&.
129   20001114: found Amanda directory\&.
130
131 Multiple Amanda directories, please pick one by letter:
132   A\&. 20001113
133   B\&. 20001114
134 Select directories to flush [A\&.\&.B]: [ALL] all
135
136 Flushing dumps in 20001113, 20001114,
137 today: 20001117
138 to tape drive /dev/rmt/0mn\&.
139 Expecting tape DMP014 or a new tape\&.  (The last dumps were to tape DMP013)
140 Are you sure you want to do this? yes
141 Running in background, you can log off now\&.
142 You\*(Aqll get mail when amflush is finished\&.
143 .fi
144 .PP
145 The following example causes amflush to flush everything to tape, then ejects tape, using \*(Aqat\*(Aq to run the task in the background\&.
146 .nf
147 % echo \*(Aqamflush \-b \-f MyConfig && mt offline\*(Aq | at now
148 .fi
149 .SH "EXIT CODE"
150
151 The exit code of \fBamflush\fR is the ORed value of:
152 .nf
153  0  = success
154  1  = error
155  4  = a dle failed
156  8  = Don\*(Aqt know the status of a dle (RESULT_MISSING in the report)
157  16 = tape error or no more tape
158 .fi
159 .SH "SEE ALSO"
160 .PP
161 \fBamanda\fR(8),
162 \fBamdump\fR(8),
163 \fBamanda-match\fR(7)
164 .PP
165 The Amanda Wiki:
166 : http://wiki.zmanda.com/
167 .SH "AUTHORS"
168 .PP
169 \fBJames da Silva\fR <\&jds@amanda\&.org\&>
170 .PP
171 \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>