Apply the right permissions to /etc/hosts
[ganeti-local] / man / gnt-backup.sgml
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2
3   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4   <!-- Please adjust the date whenever revising the manpage. -->
5   <!ENTITY dhdate      "<date>Jul 6, 2007</date>">
6   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
7        allowed: see man(7), man(1). -->
8   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
9   <!ENTITY dhucpackage "<refentrytitle>gnt-backup</refentrytitle>">
10   <!ENTITY dhpackage   "gnt-backup">
11
12   <!ENTITY debian      "<productname>Debian</productname>">
13   <!ENTITY gnu         "<acronym>GNU</acronym>">
14   <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
15   <!ENTITY footer SYSTEM "footer.sgml">
16 ]>
17
18 <refentry>
19   <refentryinfo>
20     <copyright>
21       <year>2007</year>
22       <holder>Google Inc.</holder>
23     </copyright>
24     &dhdate;
25   </refentryinfo>
26   <refmeta>
27     &dhucpackage;
28
29     &dhsection;
30     <refmiscinfo>ganeti 1.2</refmiscinfo>
31   </refmeta>
32   <refnamediv>
33     <refname>&dhpackage;</refname>
34
35     <refpurpose>ganeti instance import/export</refpurpose>
36   </refnamediv>
37   <refsynopsisdiv>
38     <cmdsynopsis>
39       <command>&dhpackage; </command>
40
41       <arg choice="req">command</arg>
42       <arg>arguments...</arg>
43     </cmdsynopsis>
44   </refsynopsisdiv>
45   <refsect1>
46     <title>DESCRIPTION</title>
47
48     <para>
49       The <command>&dhpackage;</command> is used for importing and exporting
50       instances and their configuration from a ganeti system. It is useful for
51       backing instances up and also to migrate them between clusters.
52     </para>
53
54   </refsect1>
55   <refsect1>
56     <title>COMMANDS</title>
57
58     <refsect2>
59       <title>EXPORT</title>
60
61       <cmdsynopsis>
62         <command>export</command>
63         <arg choice="req">-n <replaceable>node</replaceable></arg>
64         <arg>--noshutdown</arg>
65         <arg choice="req"><replaceable>instance</replaceable></arg>
66       </cmdsynopsis>
67
68       <para>
69         Exports an instance to the target node. All the instance data
70         and its configuration will be exported under the
71         /srv/ganeti/export/<replaceable>instance</replaceable>
72         directory on the target node.
73       </para>
74
75       <para>
76         The <option>--noshutdown</option> option will create a
77         snapshot disk of the instance without shutting it down first.
78         While this is faster and involves no downtime, it cannot be
79         guaranteed that the instance data will be in a consistent state
80         in the exported dump.
81       </para>
82
83       <para>
84         Example:
85         <screen>
86 # gnt-backup export -n node1.example.com instance3.example.com
87         </screen>
88       </para>
89     </refsect2>
90
91     <refsect2>
92       <title>IMPORT</title>
93       <cmdsynopsis>
94         <command>import</command>
95
96         <group choice="req">
97           <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
98           <arg>--iallocator <replaceable>name</replaceable></arg>
99         </group>
100         <sbr>
101
102         <arg>-s <replaceable>disksize</replaceable></arg>
103         <arg>--swap-size <replaceable>disksize</replaceable></arg>
104         <arg>-m <replaceable>memsize</replaceable></arg>
105         <sbr>
106
107         <arg>-b <replaceable>bridge</replaceable></arg>
108         <arg>--mac <replaceable>mac</replaceable></arg>
109         <sbr>
110         <arg choice="req">--src-node=<replaceable>source-node</replaceable></arg>
111         <arg choice="req">--src-dir=<replaceable>source-dir</replaceable></arg>
112         <sbr>
113
114         <arg choice="req">-t<group>
115             <arg>diskless</arg>
116             <arg>plain</arg>
117             <arg>drbd</arg>
118           </group></arg>
119         <sbr>
120
121         <arg choice="req"><replaceable>instance</replaceable></arg>
122       </cmdsynopsis>
123       <para>
124         Imports a new instance from an export residing on
125         <replaceable>source-node</replaceable> in
126         <replaceable>source-dir</replaceable>.
127         <replaceable>instance</replaceable> must be in DNS and
128         resolve to a IP in the same network as the nodes in the
129         cluster.
130       </para>
131
132       <para>
133         The <option>-s</option> option specifies the disk size for
134         the instance, in mebibytes (defaults to
135         <constant>20480MiB</constant> =
136         <constant>20GiB</constant>). You can also use one of the
137         suffixes <literal>m</literal>, <literal>g</literal> or
138         <literal>t</literal> to specificy the exact the units used;
139         these suffixes map to mebibytes, gibibytes and tebibytes.
140       </para>
141
142       <para>
143         The <option>--swap-size</option> option specifies the swap
144         disk size (in mebibytes) for the instance (the one presented
145         as <filename class="devicefile">/dev/sdb</filename>). The
146         default is <constant>4096MiB</constant>. As for the disk
147         size, you can specify other suffixes.
148       </para>
149
150       <para>
151         The <option>-m</option> option specifies the memory size for
152         the instance, in mebibytes (defaults to 128 MiB). Again, you
153         can use other suffixes (e.g. <userinput>2g</userinput>).
154       </para>
155
156       <para>
157         The <option>-b</option> option specifies the bridge to which the
158         instance will be connected. (defaults to the cluster-wide default
159         bridge specified at cluster intialization time).
160       </para>
161
162       <para>
163         The <option>--mac</option> option specifies the mac address for the
164         instance. The default is 'auto' which is reusing the previous mac
165         address if the instance is being imported with the same name, and
166         generating a new one otherwise. You can also force generation by
167         specifying 'generate'.
168       </para>
169
170       <para>
171         The <option>-t</option> options specifies the disk layout type for
172         the instance. The available choices are:
173         <variablelist>
174           <varlistentry>
175             <term>diskless</term>
176             <listitem>
177               <para>
178                 This creates an instance with no disks. Its useful for
179                 testing only (or other special cases).
180               </para>
181             </listitem>
182           </varlistentry>
183           <varlistentry>
184             <term>plain</term>
185             <listitem>
186               <para>Disk devices will be logical volumes.</para>
187             </listitem>
188           </varlistentry>
189           <varlistentry>
190             <term>drbd</term>
191             <listitem>
192               <para>
193                 Disk devices will be drbd (version 8.x) on top of lvm
194                 volumes.
195               </para>
196             </listitem>
197           </varlistentry>
198         </variablelist>
199       </para>
200
201       <para>
202         The <option>--iallocator</option> option specifies the instance
203         allocator plugin to use. If you pass in this option the allocator will
204         select nodes for this instance automatically, so you don't need to pass
205         them with the <option>-n</option> option. For more information please
206         refer to the instance allocator documentation.
207       </para>
208
209       <para>
210         The optional second value of the <option>--node</option> is used for
211         the remote raid template type and specifies the remote node.
212       </para>
213
214       <para>
215         If you do not want gnt-backup to wait for the disk mirror
216         to be synced, use the <option>--no-wait-for-sync</option>
217         option.
218       </para>
219
220       <para>
221         Example:
222         <screen>
223 # gnt-backup import -t plain -s 30 -m 512 -n node1.example.com \
224 > --src-node=node2.example.com \
225 > --src-dir=/srv/ganeti/export/instance3.example.com \
226 > instance3.example.com
227         </screen>
228       </para>
229
230     </refsect2>
231
232     <refsect2>
233       <title>LIST</title>
234
235       <cmdsynopsis>
236         <command>list</command>
237         <arg>--node=<replaceable>NODE</replaceable></arg>
238       </cmdsynopsis>
239
240       <para>
241         Lists the exports currently available in the default directory
242         in all the nodes of the current cluster, or optionally only a
243         subset of them specified using the <option>--node</option>
244         option (which can be used multiple times)
245       </para>
246
247       <para>
248       Example:
249 <screen>
250 # gnt-backup list --nodes node1 --nodes node2
251 </screen>
252     </refsect2>
253
254   </refsect1>
255
256   &footer;
257
258 </refentry>
259
260 <!-- Keep this comment at the end of the file
261 Local variables:
262 mode: sgml
263 sgml-omittag:t
264 sgml-shorttag:t
265 sgml-minimize-attributes:nil
266 sgml-always-quote-attributes:t
267 sgml-indent-step:2
268 sgml-indent-data:t
269 sgml-parent-document:nil
270 sgml-default-dtd-file:nil
271 sgml-exposed-tags:nil
272 sgml-local-catalogs:nil
273 sgml-local-ecat-files:nil
274 End:
275 -->