d628240739577cc01a44dfcf9ec48517620a80f8
[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
70         data and its configuration will be exported under the
71         /srv/ganeti/exports/instance directory on the target node.
72       </para>
73
74       <para>
75         The <option>--noshutdown</option> option will create a
76         snapshot disk of the instance without shutting it down first.
77         While this is faster and involves no downtime, it cannot be
78         guaranteed that the instance data will be in a consistent state
79         in the exported dump.
80       </para>
81
82       <para>
83         Example:
84         <screen>
85 # gnt-instance export -n node1.example.com instance3.example.com
86         </screen>
87       </para>
88     </refsect2>
89
90     <refsect2>
91       <title>IMPORT</title>
92       <cmdsynopsis>
93         <command>import</command>
94         <arg choice="req">-n <replaceable>node</replaceable></arg>
95         <arg>-s <replaceable>disksize</replaceable></arg>
96         <arg>-o <replaceable>os-type</replaceable></arg>
97         <arg>-m <replaceable>memsize</replaceable></arg>
98         <arg>-b <replaceable>bridge</replaceable></arg>
99         <sbr>
100         <arg choice="req">-t<group>
101             <arg>diskless</arg>
102             <arg>plain</arg>
103             <arg>local_raid1</arg>
104             <arg>remote_raid1</arg>
105           </group>
106         </arg>
107         <arg choice="req">--src-node=<replaceable>source-node</replaceable></arg>
108         <arg choice="req">--src-dir=<replaceable>source-dir</replaceable></arg>
109         <arg choice="req"><replaceable>instance</replaceable></arg>
110       </cmdsynopsis>
111       <para>
112         Imports a new instance from an export residing on
113         <replaceable>source-node</replaceable> in
114         <replaceable>source-dir</replaceable>.
115         <replaceable>instance</replaceable> must be in DNS and
116         resolve to a IP in the same network as the nodes in the
117         cluster.
118       </para>
119
120       <para>
121         The <option>-s</option> option specifies the disk size for
122         the instance, in gigibytes (defaults to 20 GiB).
123       </para>
124
125       <para>
126         The <option>-o</option> options specifies the operating
127         system to be installed. The available operating systems can
128         be listed with <command>gnt-os list</command>.
129       </para>
130
131       <para>
132         The <option>-m</option> option specifies the memory size for
133         the instance, in megibytes (defaults to 128 MiB).
134       </para>
135
136       <para>
137         The <option>-b</option> option specifies the bridge to which the
138         instance will be connected. (defaults to the cluster-wide default
139         bridge specified at cluster intialization time).
140       </para>
141
142       <para>
143         The <option>-t</option> options specifies the disk layout type for
144         the instance. The available choices are:
145         <variablelist>
146           <varlistentry>
147             <term>diskless</term>
148             <listitem>
149               <para>
150                 This creates an instance with no disks. Its useful for
151                 testing only (or other special cases).
152               </para>
153             </listitem>
154           </varlistentry>
155           <varlistentry>
156             <term>plain</term>
157             <listitem>
158               <para>Disk devices will be logical volumes.</para>
159             </listitem>
160           </varlistentry>
161           <varlistentry>
162             <term>local_raid1</term>
163             <listitem>
164               <para>
165                 Disk devices will be md raid1 arrays over two local
166                 logical volumes.
167               </para>
168             </listitem>
169           </varlistentry>
170           <varlistentry>
171             <term>remote_raid1</term>
172             <listitem>
173               <para>
174                 Disk devices will be md raid1 arrays with one
175                 component (so it's not actually raid1): a drbd device
176                 between the instance's primary node and the node given
177                 by the option <option>--secondary-node</option>.
178               </para>
179             </listitem>
180           </varlistentry>
181         </variablelist>
182       </para>
183
184       <para>
185         The <option>--secondary-node</option> option is used with
186         the remote raid disk template type and specifies the remote
187         node.
188       </para>
189
190       <para>
191         If you do not want gnt-instance to wait for the disk mirror
192         to be synced, use the <option>--no-wait-for-sync</option>
193         option.
194       </para>
195
196
197       <para>
198         Example:
199         <screen>
200 # gnt-backup import -t plain -s 30 -m 512 -n node1.example.com \
201 > --src-node=node2.example.com \
202 > --src-dir=/srv/ganeti/exports/instance3.example.com \
203 > instance3.example.com
204         </screen>
205       </para>
206
207     </refsect2>
208
209     <refsect2>
210       <title>LIST</title>
211
212       <cmdsynopsis>
213         <command>list</command>
214         <arg>--nodes=<replaceable>NODE-LIST</replaceable></arg>
215       </cmdsynopsis>
216
217       <para>
218         Lists the exports currently available in the default directory in all
219         the nodes of the current cluster, or optionally only a subset of them
220         specified by the <option>--nodes</option> option.
221       </para>
222
223     </refsect2>
224
225   </refsect1>
226
227   &footer;
228
229 </refentry>
230
231 <!-- Keep this comment at the end of the file
232 Local variables:
233 mode: sgml
234 sgml-omittag:t
235 sgml-shorttag:t
236 sgml-minimize-attributes:nil
237 sgml-always-quote-attributes:t
238 sgml-indent-step:2
239 sgml-indent-data:t
240 sgml-parent-document:nil
241 sgml-default-dtd-file:nil
242 sgml-exposed-tags:nil
243 sgml-local-catalogs:nil
244 sgml-local-ecat-files:nil
245 End:
246 -->