gnt-backup.sgml 7.8 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [

  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
  <!-- Please adjust the date whenever revising the manpage. -->
  <!ENTITY dhdate      "<date>Jul 6, 2007</date>">
  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
       allowed: see man(7), man(1). -->
  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
  <!ENTITY dhucpackage "<refentrytitle>gnt-backup</refentrytitle>">
  <!ENTITY dhpackage   "gnt-backup">

  <!ENTITY debian      "<productname>Debian</productname>">
  <!ENTITY gnu         "<acronym>GNU</acronym>">
  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
  <!ENTITY footer SYSTEM "footer.sgml">
]>

<refentry>
  <refentryinfo>
    <copyright>
      <year>2007</year>
      <holder>Google Inc.</holder>
    </copyright>
    &dhdate;
  </refentryinfo>
  <refmeta>
    &dhucpackage;

    &dhsection;
    <refmiscinfo>ganeti 1.2</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>&dhpackage;</refname>

    <refpurpose>ganeti instance import/export</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>&dhpackage; </command>

      <arg choice="req">command</arg>
      <arg>arguments...</arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>

    <para>
      The <command>&dhpackage;</command> is used for importing and exporting
      instances and their configuration from a ganeti system. It is useful for
      backing instances up and also to migrate them between clusters.
    </para>

  </refsect1>
  <refsect1>
    <title>COMMANDS</title>

    <refsect2>
      <title>EXPORT</title>

      <cmdsynopsis>
        <command>export</command>
        <arg choice="req">-n <replaceable>node</replaceable></arg>
        <arg>--noshutdown</arg>
        <arg choice="req"><replaceable>instance</replaceable></arg>
      </cmdsynopsis>

      <para>
Iustin Pop's avatar
Iustin Pop committed
69
70
71
72
        Exports an instance to the target node. All the instance data
        and its configuration will be exported under the
        /srv/ganeti/exports/<replaceable>instance</replaceable>
        directory on the target node.
73
74
75
76
77
78
79
80
81
82
83
84
85
      </para>

      <para>
        The <option>--noshutdown</option> option will create a
        snapshot disk of the instance without shutting it down first.
        While this is faster and involves no downtime, it cannot be
        guaranteed that the instance data will be in a consistent state
        in the exported dump.
      </para>

      <para>
        Example:
        <screen>
Guido Trotter's avatar
Guido Trotter committed
86
# gnt-backup export -n node1.example.com instance3.example.com
87
88
89
90
91
92
93
94
        </screen>
      </para>
    </refsect2>

    <refsect2>
      <title>IMPORT</title>
      <cmdsynopsis>
        <command>import</command>
95
        <arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
96
97
98
99
100
101
102
103
104
105
        <arg>-s <replaceable>disksize</replaceable></arg>
        <arg>-o <replaceable>os-type</replaceable></arg>
        <arg>-m <replaceable>memsize</replaceable></arg>
        <arg>-b <replaceable>bridge</replaceable></arg>
        <sbr>
        <arg choice="req">-t<group>
            <arg>diskless</arg>
            <arg>plain</arg>
            <arg>local_raid1</arg>
            <arg>remote_raid1</arg>
Iustin Pop's avatar
Iustin Pop committed
106
            <arg>drbd</arg>
107
108
          </group>
        </arg>
Iustin Pop's avatar
Iustin Pop committed
109
        <sbr>
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
        <arg choice="req">--src-node=<replaceable>source-node</replaceable></arg>
        <arg choice="req">--src-dir=<replaceable>source-dir</replaceable></arg>
        <arg choice="req"><replaceable>instance</replaceable></arg>
      </cmdsynopsis>
      <para>
        Imports a new instance from an export residing on
        <replaceable>source-node</replaceable> in
        <replaceable>source-dir</replaceable>.
        <replaceable>instance</replaceable> must be in DNS and
        resolve to a IP in the same network as the nodes in the
        cluster.
      </para>

      <para>
        The <option>-s</option> option specifies the disk size for
Iustin Pop's avatar
Iustin Pop committed
125
        the instance, in gibibytes (defaults to 20 GiB).
126
127
128
129
130
131
132
133
134
135
      </para>

      <para>
        The <option>-o</option> options specifies the operating
        system to be installed. The available operating systems can
        be listed with <command>gnt-os list</command>.
      </para>

      <para>
        The <option>-m</option> option specifies the memory size for
Iustin Pop's avatar
Iustin Pop committed
136
        the instance, in mebibytes (defaults to 128 MiB).
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
      </para>

      <para>
        The <option>-b</option> option specifies the bridge to which the
        instance will be connected. (defaults to the cluster-wide default
        bridge specified at cluster intialization time).
      </para>

      <para>
        The <option>-t</option> options specifies the disk layout type for
        the instance. The available choices are:
        <variablelist>
          <varlistentry>
            <term>diskless</term>
            <listitem>
              <para>
                This creates an instance with no disks. Its useful for
                testing only (or other special cases).
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>plain</term>
            <listitem>
              <para>Disk devices will be logical volumes.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>local_raid1</term>
            <listitem>
              <para>
                Disk devices will be md raid1 arrays over two local
                logical volumes.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>remote_raid1</term>
            <listitem>
              <para>
Iustin Pop's avatar
Iustin Pop committed
177
178
179
180
                Disk devices will be md raid1 arrays with one
                component (so it's not actually raid1): a drbd (0.7.x)
                device between the instance's primary node and the
                node given by the second value of the
181
                <option>--node</option> option.
182
183
184
              </para>
            </listitem>
          </varlistentry>
Iustin Pop's avatar
Iustin Pop committed
185
186
187
188
189
190
191
192
193
194
195
196
          <varlistentry>
            <term>drbd</term>
            <listitem>
              <para>
                Disk devices will be drbd (version 8.x) on top of lvm
                volumes. They are equivalent in functionality to
                <replaceable>remote_raid1</replaceable>, but are
                recommended for new instances (if you have drbd 8.x
                installed).
              </para>
            </listitem>
          </varlistentry>
197
198
199
200
        </variablelist>
      </para>

      <para>
Guido Trotter's avatar
Guido Trotter committed
201
        If you do not want gnt-backup to wait for the disk mirror
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
        to be synced, use the <option>--no-wait-for-sync</option>
        option.
      </para>

      <para>
        Example:
        <screen>
# gnt-backup import -t plain -s 30 -m 512 -n node1.example.com \
> --src-node=node2.example.com \
> --src-dir=/srv/ganeti/exports/instance3.example.com \
> instance3.example.com
        </screen>
      </para>

    </refsect2>

    <refsect2>
      <title>LIST</title>

      <cmdsynopsis>
        <command>list</command>
Guido Trotter's avatar
Guido Trotter committed
223
        <arg>--node=<replaceable>NODE</replaceable></arg>
224
225
226
      </cmdsynopsis>

      <para>
Iustin Pop's avatar
Iustin Pop committed
227
228
        Lists the exports currently available in the default directory
        in all the nodes of the current cluster, or optionally only a
Guido Trotter's avatar
Guido Trotter committed
229
230
        subset of them specified using the <option>--node</option>
        option (which can be used multiple times)
231
232
      </para>

Iustin Pop's avatar
Iustin Pop committed
233
234
235
236
237
      <para>
      Example:
<screen>
# gnt-backup list --nodes node1 --nodes node2
</screen>
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
    </refsect2>

  </refsect1>

  &footer;

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->