a2e14142c319f362ce6a1d4f1ccb5712b30af1ce
[debian/amanda] / man / xml-source / amvault.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 <refentry id='amvault.8'>
11 <refmeta>
12 <refentrytitle>amvault</refentrytitle>
13 <manvolnum>8</manvolnum>
14 &rmi.source;
15 &rmi.version;
16 &rmi.manual.8;
17 </refmeta>
18 <refnamediv>
19 <refname>amvault</refname>
20 <refpurpose>Copy Amanda dumps from one volume to another</refpurpose>
21 </refnamediv>
22 <refentryinfo>
23 &author.dustin;
24 </refentryinfo>
25 <!-- body begins here -->
26 <refsynopsisdiv>
27 <cmdsynopsis>
28   <command>amvault</command>
29     &configoverride.synopsis;
30     <group choice='opt'><arg choice='plain'>--dry-run</arg><arg choice='plain'>-n</arg></group>
31     <group choice='opt'><arg choice='plain'>--quiet</arg><arg choice='plain'>-q</arg></group>
32     <arg choice='opt'>--fulls-only </arg>
33     <arg choice='opt'>--export </arg>
34     <arg choice='opt'><option>--src-timestamp</option>
35         <replaceable>src-timestamp</replaceable></arg>
36     <sbr/>
37     <arg choice='plain'><option>--label-template</option>
38             <replaceable>label-template</replaceable></arg>
39     <arg choice='plain'><option>--dst-changer</option>
40             <replaceable>dst-changer</replaceable></arg>
41     <arg choice='opt' rep='repeat'><option>--autolabel</option>
42             <replaceable>autolabel-arg</replaceable></arg>
43     <sbr/>
44     <arg choice='plain'><replaceable>config</replaceable></arg>
45     <arg choice='opt'>
46       <arg choice='plain'><replaceable>hostname</replaceable></arg>
47       <arg choice='opt'>
48         <arg choice='plain'><replaceable>disk</replaceable></arg>
49         <arg choice='opt'>
50           <arg choice='plain'><replaceable>date</replaceable></arg>
51           <arg choice='opt'>
52             <arg choice='plain'><replaceable>level</replaceable></arg>
53             <arg choice='opt'>
54               <arg choice='plain'><replaceable>hostname</replaceable></arg>
55               <arg choice='opt'>...</arg>
56             </arg>
57           </arg>
58         </arg>
59       </arg>
60     </arg>
61 </cmdsynopsis>
62 </refsynopsisdiv>
63
64 <refsect1><title>WARNING</title>
65
66 <para>This application is not yet in its final form, and is subject to major revision
67 in subsequent versions of Amanda.  Backward compatibility is not guaranteed.</para>
68
69 <para>Note that Amanda restore/recover operations will request tertiary media
70 by label when dumpfiles are not found on secondary media, but there is no
71 provision to automatically fetch such media from a different changer</para>
72
73 <para>Feedback on and patches to this application are invited and
74 encouraged!</para>
75
76 </refsect1>
77
78 <refsect1><title>DESCRIPTION</title>
79
80 <para>Amvault is conceptually equivalent to "amfetchdump | taper".  That is, it reads
81 specified dumps from secondary media and re-writes them on tertiary media.</para>
82
83 <para><emphasis remap='B'>Amvault</emphasis> Copies data from the run with
84 timestamp <option>src-timestamp</option> onto volumes using the changer
85 <option>dst-changer</option>, and labeling new volumes with
86 <option>label-template</option>.</para>
87
88 <refsect2><title>Secondary Media</title>
89
90 <para>The dumps to be read from secondary media can be specified by any
91 combination of dump specifications, <option>--fulls-only</option>, and
92 <option>--src-timestamp</option>.  At least one must be specified, lest
93 amvault attempt to vault all dumps in the catalog.  See <manref
94     name="amanda-match" vol="7"/> for more information on dump
95 specifications.</para>
96
97 <para>Note that the datestamp given in the dumpspec is the
98 <emphasis>dump</emphasis> datestamp - the run in which the backup was taken
99 on the Amanda client.  The <option>--src-timestamp</option>, on the other
100 hand, is the <emphasis>write</emphasis> timestamp - the run in which the
101 dump was written to secondary media.  The latter option facilitates
102 duplicating the results of an entire backup run, including any dumps that
103 might have been flushed from holding disk.</para>
104
105 </refsect2>
106
107 <refsect2><title>Tertiary Media</title>
108
109 <para>The <option>--dst-changer</option> must be specified, and names the
110 changer in which tertiary media are stored.</para>
111
112 <para>If &amconf; contains the new <amkeyword>part-size</amkeyword>
113 splitting parameters, then amvault will use them without any additional configuration.
114 However, if the configuration still uses the old splitting parameters
115 (<amkeyword>tape_splitsize</amkeyword>,
116 <amkeyword>split_diskbuffer</amkeyword>, and
117 <amkeyword>fallback_splitsize</amkeyword>), then amvault will need some
118 additional configuration in order to properly split dumps to tertiary
119 media.  To do so, specify a new tapetype in &amconf;, say "TERTIARY",
120 and set the <amkeyword>part-size</amkeyword> and other appropriate
121 parameters there.  Then reference that tapetype in the amvault invocation:
122 <programlisting>
123     amvault -otapetype=TERTIARY ...
124 </programlisting></para>
125
126 </refsect2>
127
128 </refsect1>
129
130 <refsect1><title>OPTIONS</title>
131 <variablelist remap='TP'>
132   <varlistentry>
133   <term><option>--autolabel</option> <arg choice='opt'>any</arg>
134                                      <arg choice='opt'>other-config</arg>
135                                      <arg choice='opt'>non-amanda</arg>
136                                      <arg choice='opt'>volume-error</arg>
137                                      <arg choice='opt'>empty</arg></term>
138   <listitem>
139 <para>Works just like the
140 <amkeyword>autolabel</amkeyword> parameter in &amconf;, and can be
141 specified multiple times if necessary.  The default is 'empty'.</para>
142   </listitem>
143   </varlistentry>
144
145   <varlistentry>
146   <term><option>--dst-changer</option> <replaceable>dst-changer</replaceable></term>
147   <listitem>
148 <para>Specifies the changer
149 in which tertiary media are stored.  In general, this should be different
150 from the secondary changer, to eliminate the possibility of overwriting
151 secondary media with tertiary data.</para>
152
153 <para>The <amkeyword>dst-changer</amkeyword> parameter should specify the name of a changer defined in
154 &amconf;.  For example:
155 <programlisting>
156 define changer vaulting_tape {
157     tapedev "/dev/rmt/1n"
158     tpchanger "chg-zd-mtx"
159     changerdev "/dev/sg0"
160     changerfile "vaulting-changer.conf"
161 }
162 </programlisting></para>
163   </listitem>
164   </varlistentry>
165
166   <varlistentry>
167   <term><option>--dry-run</option></term><term><option>-n</option></term>
168   <listitem>
169 <para>Cause amvault to print the dumps it would vault, but not actually
170 perform any vaulting operations.</para>
171   </listitem>
172   </varlistentry>
173
174   <varlistentry>
175   <term><option>--export</option></term>
176   <listitem>
177 <para>Cause amvault to attempt to move completed tertiary volumes to
178 import/export slots, where they can be more easily removed by an operator.
179 </para>
180   </listitem>
181   </varlistentry>
182
183   <varlistentry>
184   <term><option>---fulls-only</option></term>
185   <listitem>
186 <para>Only full (level-0) dumps are copied.</para>
187   </listitem>
188   </varlistentry>
189
190   <varlistentry>
191   <term><option>--label-template</option> <replaceable>label-template</replaceable></term>
192   <listitem>
193 <para>Specifies a label template which is used to generate new labels for
194 tertiary volumes.</para>
195   </listitem>
196   </varlistentry>
197
198   <varlistentry>
199   <term><option>--quiet</option></term><term><option>-q</option></term>
200   <listitem>
201 <para>Eliminate non-error messages, and is useful when running amvault from
202 cron.</para>
203   </listitem>
204   </varlistentry>
205
206   <varlistentry>
207   <term><option>--src-timestamps</option> <replaceable>src-timestamps</replaceable></term>
208   <listitem>
209 <para>Specifies the timestamps in the format 'YYYYMMDDHHMMSS' of the run to
210 vault, can be "latest", then the most recent amdump or amflush run will be
211 used.</para>
212   </listitem>
213   </varlistentry>
214
215  <varlistentry>
216   <term><option>-o</option> <replaceable>configoption</replaceable></term>
217   <listitem>
218 <para>See the "<emphasis remap='B'>CONFIGURATION OVERRIDE</emphasis>"
219  section in <manref name="amanda" vol="8"/>.</para>
220   </listitem>
221   </varlistentry>
222
223 </variablelist>
224
225
226 </refsect1>
227
228 <refsect1><title>EXAMPLES</title>
229
230 <para>Vault all dump written to tape in the latest amdump or amflush run:</para>
231 <programlisting>
232 $ amvault --src-timestamps latest --label-template "CONF-%%%" --dst-changer vault-changer CONF
233 </programlisting>
234
235 <para>Vault all dump written on the run of December 7 2011 12:13:14 :</para>
236 <programlisting>
237 $ amvault --src-timestamps 20111207121314 --label-template "CONF-%%%" --dst-changer vault-changer CONF
238 </programlisting>
239
240 <para>Vault all dump dumped on any run of December 7 2011:</para>
241 <programlisting>
242 $ amvault --label-template "CONF-%%%" --dst-changer vault-changer CONF \* \* 20111207
243 </programlisting>
244
245 </refsect1>
246
247 <seealso>
248 <manref name="amanda-changers" vol="7"/>
249 <manref name="amfetchdump" vol="8"/>
250 </seealso>
251
252 </refentry>
253