Imported Upstream version 3.1.0
[debian/amanda] / man / amflush.8
1 '\" t
2 .\"     Title: amflush
3 .\"    Author: James da Silva <jds@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 "AMFLUSH" "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 amflush \- flush Amanda backup files from holding disk to tape
23 .SH "SYNOPSIS"
24 .HP \w'\fBamflush\fR\ 'u
25 \fBamflush\fR [\-b] [\-f] [\-s] [\-D\ \fIdatestamp\fR] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] [{\fB\-o\fR\ \fIconfigoption\fR}...]
26 .SH "DESCRIPTION"
27 .PP
28 \fBAmflush\fR
29 writes Amanda backups from the holding disks to tape, and updates the Amanda info database and
30 \fBtapelist\fR(5)
31 accordingly\&. Backups may stay in a holding disk when something is wrong with the tape at the time
32 \fBamdump\fR
33 is run\&. When this happens, the problem must be corrected and
34 \fBamflush\fR
35 run by hand\&.
36 .SH "OPTIONS"
37 .PP
38 \fB\-b\fR
39 .RS 4
40 Run
41 \fBamflush\fR
42 in batch mode\&. All datestamps are selected unless specified\&. The flush is started without confirmation\&.
43 .RE
44 .PP
45 \fB\-f\fR
46 .RS 4
47 Run
48 \fBamflush\fR
49 in foreground\&.
50 \fBAmflush\fR
51 normally detaches itself from the tty and runs as a background process\&. With the
52 \fB\-f\fR
53 option,
54 \fBamflush\fR
55 stays in the foreground\&. This is useful if
56 \fBamflush\fR
57 is run as part of another script that, for example, advances the tape after the flush is completed\&.
58 .RE
59 .PP
60 \fB\-s\fR
61 .RS 4
62 Write log to stdout/stderr instead of the amflush log file\&. Requires the
63 \fB\-f\fR
64 option\&.
65 .RE
66 .PP
67 \fB\-D datestamp\fR
68 .RS 4
69 specify a datestamp expression you want to flush, see the "DATESTAMP EXPRESSION" section of
70 \fBamanda\fR(8)
71 for a description\&.
72 \fB\-D 20001225\-7\fR
73 will flush all dumps from 25 december 2000 to 27 december 2000\&.
74 .RE
75 .PP
76 \fIhost\fR [\fIdisk\fR]*
77 .RS 4
78 Specify the host and disk on which the command will work\&.
79 .RE
80 .PP
81 \fB\-o \fR\fB\fIconfigoption\fR\fR
82 .RS 4
83 See the "CONFIGURATION OVERRIDE" section in
84 \fBamanda\fR(8)\&.
85 .RE
86 .PP
87 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
88 \fBamanda\fR(8)
89 for a description\&.
90 .PP
91 \fBAmflush\fR
92 will look in the holding disks specified by the
93 \fIamanda\&.conf\fR
94 file in /usr/local/etc/amanda/\fIconfig\fR
95 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
96 \fBamdump\fR
97 was run, e\&.g\&.
98 19910215\&.
99 .PP
100 See the
101 \fBamanda\fR(8)
102 man page for more details about Amanda\&.
103 .SH "EXAMPLE"
104 .PP
105 \fBAmflush\fR
106 will search for holding areas associated with the
107 \fIdaily\fR
108 configuration\&. After you select which holding area to flush,
109 \fBamflush\fR
110 writes the data to tape, updates the databases and sends a mail report similar to
111 \fBamdump\fR(8)\&.
112 .nf
113 % amflush MyConfig
114 Scanning /amanda\-hold\&.\&.\&.
115   20001113: found Amanda directory\&.
116   20001114: found Amanda directory\&.
117
118 Multiple Amanda directories, please pick one by letter:
119   A\&. 20001113
120   B\&. 20001114
121 Select directories to flush [A\&.\&.B]: [ALL] all
122
123 Flushing dumps in 20001113, 20001114,
124 today: 20001117
125 to tape drive /dev/rmt/0mn\&.
126 Expecting tape DMP014 or a new tape\&.  (The last dumps were to tape DMP013)
127 Are you sure you want to do this? yes
128 Running in background, you can log off now\&.
129 You\'ll get mail when amflush is finished\&.
130 .fi
131 .PP
132 The following example causes amflush to flush everything to tape, then ejects tape, using \'at\' to run the task in the background\&.
133 .nf
134 % echo \'amflush \-b \-f MyConfig && mt offline\' | at now
135 .fi
136 .SH "EXIT CODE"
137
138 The exit code of \fBamflush\fR is the ORed value of:
139 .nf
140  0  = success
141  1  = error
142  4  = a dle failed
143  8  = Don\'t know the status of a dle (RESULT_MISSING in the report)
144  16 = tape error or no more tape
145 .fi
146 .SH "SEE ALSO"
147 .PP
148 \fBamanda\fR(8),
149 \fBamdump\fR(8)
150 .PP
151 The Amanda Wiki:
152 : http://wiki.zmanda.com/
153 .SH "AUTHORS"
154 .PP
155 \fBJames da Silva\fR <\&jds@amanda\&.org\&>
156 .PP
157 \fBStefan G\&. Weichinger\fR <\&sgw@amanda\&.org\&>