]> git.proxmox.com Git - mirror_lxc.git/blame - doc/ja/lxc-copy.sgml.in
spelling: backingstorage
[mirror_lxc.git] / doc / ja / lxc-copy.sgml.in
CommitLineData
842948e4
KY
1<!--
2
3lxc: linux Container library
4
5(C) Copyright Canonical Inc. 2007, 2008
6
7Authors:
8Christian Brauner <christian.brauner at mailbox.org>
9
10This library is free software; you can redistribute it and/or
11modify it under the terms of the GNU Lesser General Public
12License as published by the Free Software Foundation; either
13version 2.1 of the License, or (at your option) any later version.
14
15This library is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18Lesser General Public License for more details.
19
20You should have received a copy of the GNU Lesser General Public
21License along with this library; if not, write to the Free Software
22Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
24Translated into Japanese
25by KATOH Yasufumi <karma at jazz.email.ne.jp>
26
27-->
28
29<!DOCTYPE refentry PUBLIC @docdtd@ [
30
31<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
32<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
33]>
34
35<refentry>
36
37 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
38
39 <refmeta>
40 <refentrytitle>lxc-copy</refentrytitle>
41 <manvolnum>1</manvolnum>
42 </refmeta>
43
44 <refnamediv>
45 <refname>lxc-copy</refname>
46
47 <refpurpose>
48 <!--
49 copy an existing container.
50 -->
51 既存のコンテナのコピー
52 </refpurpose>
53 </refnamediv>
54
55 <refsynopsisdiv>
56 <cmdsynopsis>
57 <command>lxc-copy</command>
58 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
59 <arg choice="opt">-P, --lxcpath <replaceable>path</replaceable></arg>
60 <arg choice="req">-N, --newname <replaceable>newname</replaceable></arg>
61 <arg choice="opt">-p, --newpath <replaceable>newpath</replaceable></arg>
62 <arg choice="opt">-B, --backingstorage <replaceable>backingstorage</replaceable></arg>
63 <arg choice="opt">-s, --snapshot</arg>
53a92bbc
KY
64 <arg choice="opt">-K, --keepname</arg>
65 <arg choice="opt">-D, --keepdata</arg>
842948e4
KY
66 <arg choice="opt">-M, --keepmac</arg>
67 <arg choice="opt">-L, --fssize <replaceable>size [unit]</replaceable></arg>
79dff39e 68 <arg choice="opt">-- hook arguments</arg>
842948e4
KY
69 </cmdsynopsis>
70 <cmdsynopsis>
71 <command>lxc-copy</command>
72 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
73 <arg choice="opt">-P, --lxcpath <replaceable>path</replaceable></arg>
74 <arg choice="opt">-N, --newname <replaceable>newname</replaceable></arg>
75 <arg choice="opt">-p, --newpath <replaceable>newpath</replaceable></arg>
76 <arg choice="req">-e, --ephemeral</arg>
77 <arg choice="opt">-B, --backingstorage <replaceable>backingstorage</replaceable></arg>
78 <arg choice="opt">-s, --snapshot</arg>
53a92bbc
KY
79 <arg choice="opt">-K, --keepname</arg>
80 <arg choice="opt">-D, --keepdata</arg>
842948e4
KY
81 <arg choice="opt">-M, --keepmac</arg>
82 <arg choice="opt">-L, --fssize <replaceable>size [unit]</replaceable></arg>
79dff39e 83 <arg choice="opt">-- hook arguments</arg>
842948e4 84 </cmdsynopsis>
53a92bbc
KY
85 <cmdsynopsis>
86 <command>lxc-copy</command>
87 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
88 <arg choice="opt">-P, --lxcpath <replaceable>path</replaceable></arg>
89 <arg choice="opt">-N, --newname <replaceable>newname</replaceable></arg>
90 <arg choice="opt">-p, --newpath <replaceable>newpath</replaceable></arg>
91 <arg choice="req">-e, --ephemeral</arg>
92 <arg choice="opt">-B, --backingstorage <replaceable>backingstorage</replaceable></arg>
93 <arg choice="opt">-s, --snapshot</arg>
94 <arg choice="opt">-t, --tmpfs</arg>
95 <arg choice="opt">-K, --keepname</arg>
96 <arg choice="opt">-M, --keepmac</arg>
97 <arg choice="opt">-- hook arguments</arg>
98 </cmdsynopsis>
842948e4
KY
99 <cmdsynopsis>
100 <command>lxc-copy</command>
101 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
102 <arg choice="opt">-P, --lxcpath <replaceable>path</replaceable></arg>
103 <arg choice="req">-N, --newname <replaceable>newname</replaceable></arg>
104 <arg choice="opt">-p, --newpath <replaceable>newpath</replaceable></arg>
105 <arg choice="req">-R, --rename</arg>
106 </cmdsynopsis>
107 </refsynopsisdiv>
108
109 <refsect1>
110 <title><!-- Description -->説明</title>
111
112 <para>
113 <!--
114 <command>lxc-copy</command> creates and optionally starts (ephemeral or
115 non-ephemeral) copies of existing containers. It replaces
116 <command>lxc-clone</command> and <command>lxc-start-ephemeral</command>.
117 -->
118 <command>lxc-copy</command> は、すでに存在するコンテナのコピーを作成します。オプションを指定することで、作成後にそのコピーを起動できます (コピーは一時的なコピーまたは永続的なコピーのどちらも可能です)。
119 このコマンドは <command>lxc-clone</command> と <command>lxc-start-ephemeral</command> の置き換えのコマンドです。
120 </para>
121 <para>
122 <!--
123 <command>lxc-copy</command> creates copies of existing containers. Copies
124 can be complete clones of the original container. In this case the whole
125 root filesystem of the container is simply copied to the new container. Or
126 they can be snapshots, i.e. small copy-on-write copies of the original
127 container. In this case the specified backing storage for the copy must
07a911c8 128 support snapshots. This currently includes btrfs, lvm (lvm devices
842948e4
KY
129 do not support snapshots of snapshots.), overlay, and zfs.
130 -->
131 <command>lxc-copy</command> は、既存のコンテナのコピーを作成します。
132 コピーは元のコンテナの完全なクローンにできます。この場合、単にコンテナのルートファイルシステムのすべてが、新しいコンテナにコピーされます。
133 また、スナップショットを取得することも可能です。すなわち、元のコンテナの小さなコピーオンライトのコピーにするということです。この場合、コピーで指定するバッキングストレージがスナップショットをサポートしている必要があります。
07a911c8 134 スナップショットをサポートしているバッキングストレージは、現時点では btrfs、lvm (lvm デバイスはスナップショットのスナップショットはサポートしていません)、overlay、zfs です。
842948e4 135 </para>
07a911c8 136
842948e4
KY
137 <para>
138 <!--
139 The copy's backing storage will be of the same type as the original
07a911c8 140 container. overlay snapshots of directory backed containers are
842948e4
KY
141 exempted from this rule.
142 -->
07a911c8 143 コピー先のバッキングストレージは、元のコンテナと同じタイプになるでしょう。ただし、ディレクトリバックエンドのコンテナのスナップショットは overlay で取得できますので例外です。
842948e4
KY
144 </para>
145
146 <para>
147 <!--
148 When the <replaceable>-e</replaceable> flag is specified an ephemeral
149 snapshot of the original container is created and started. Ephemeral
150 containers will have <command>lxc.ephemeral = 1</command> set in their
151 config file and will be destroyed on shutdown. When
152 <replaceable>-e</replaceable> is used in combination with
153 <replaceable>-D</replaceable> a non-ephemeral snapshot of the original
154 container is created and started.
53a92bbc
KY
155 Ephemeral containers can also be placed on a tmpfs with <replaceable>-t</replaceable>
156 flag. NOTE: If an ephemeral container that is placed on a tmpfs is rebooted
157 all changes made to it will currently be lost!
842948e4
KY
158 -->
159 <replaceable>-e</replaceable> オプションを指定した場合は、元のコンテナの一時的なスナップショットを作成し、起動します。一時的なコンテナの場合、設定ファイルに <command>lxc.ephemeral = 1</command> がセットされ、シャットダウン後に削除されます。
160 <replaceable>-e</replaceable> と <replaceable>-D</replaceable> を同時に指定すると、元のコンテナの一時的ではないスナップショットを作成し、起動します。
53a92bbc
KY
161 <replaceable>-t</replaceable> オプションを指定して、一時的なコンテナを tmpfs 上に置くことができます。
162 注意: tmpfs 上に置いた一時的なコンテナをリブートすると、コンテナに対して行ったすべての変更は失われます!
842948e4
KY
163 </para>
164
165 <para>
166 <!--
167 When <replaceable>-e</replaceable> is specified and no newname is given via
168 <replaceable>-N</replaceable> a random name for the snapshot will be chosen.
169 -->
988247d5 170 <replaceable>-e</replaceable> を指定した場合で、<replaceable>-N</replaceable> でコンテナの名前を指定しない場合は、スナップショットの名前はランダムで命名されます。
842948e4
KY
171 </para>
172
173 <para>
174 <!--
175 Containers created and started with <replaceable>-e</replaceable> can have
176 custom mounts. These are specified with the <replaceable>-m</replaceable>
177 flag. Currently three types of mounts are supported:
07a911c8 178 <replaceable>bind</replaceable>, and
842948e4
KY
179 <replaceable>overlay</replaceable>. Mount types are specified as suboptions
180 to the <replaceable>-m</replaceable> flag and can be specified multiple
07a911c8
KY
181 times separated by commas. <replaceable>overlay</replaceable> mounts are
182 currently specified in the format <replaceable>-m
183 overlay=/src:/dest</replaceable>. When no destination
184 <replaceable>dest</replaceable> is specified
842948e4
KY
185 <replaceable>dest</replaceable> will be identical to
186 <replaceable>src</replaceable>. Read-only <replaceable>bind</replaceable>
187 mounts are specified <replaceable>-m bind=/src:/dest:ro</replaceable> and
188 read-write <replaceable>bind</replaceable> mounts <replaceable>-m
189 bind=/src:/dest:rw</replaceable>. Read-write <replaceable>bind</replaceable>
190 mounts are the default and <replaceable>rw</replaceable> can be missing when
191 a read-write mount is wanted. When <replaceable>dest</replaceable> is
192 missing <replaceable>dest</replaceable> will be identical to
193 <replaceable>src</replaceable>. An example for multiple mounts would be
194 <replaceable>-m
195 bind=/src1:/dest1:ro,bind=/src2:ro,overlay=/src3:/dest3</replaceable>.
196 -->
07a911c8 197 <replaceable>-e</replaceable> で作成し、起動したコンテナは、コンテナ独自のマウントを行えます。現時点では <replaceable>bind</replaceable>、<replaceable>overlay</replaceable> という 2 つのタイプのマウントがサポートされています。
842948e4 198 マウントタイプは <replaceable>-m</replaceable> オプションのサブオプションとして指定します。この指定はカンマ区切りで複数回指定できます。
07a911c8 199 <replaceable>overlay</replaceable> マウントの場合は、現時点では <replaceable>-m overlay=/src:/dest</replaceable> のように指定します。マウント先の <replaceable>dest</replaceable> を指定しない場合は、<replaceable>dest</replaceable> は <replaceable>src</replaceable> と同じになります。
842948e4
KY
200 読み込み専用の <replaceable>bind</replaceable> マウントは <replaceable>-m bind=/src:/dest:ro</replaceable> のように指定します。読み書き可能な <replaceable>bind</replaceable> マウントは <replaceable>-m bind=/src:/dest:rw</replaceable> のように指定します。<replaceable>bind</replaceable> マウントのデフォルトは読み書き可能ですので、読み書き可能なマウントを行う場合は省略できます。マウント先の <replaceable>dest</replaceable> を指定しない場合は、<replaceable>dest</replaceable> は <replaceable>src</replaceable> と同じになります。
201 複数のマウントを行う場合の例を示すと、<replaceable>-m bind=/src1:/dest1:ro,bind=/src2:ro,overlay=/src3:/dest3</replaceable> のようになります。
202 </para>
203
204 <para>
205 <!--
206 The mounts, their options, and formats supported via the
207 <replaceable>-m</replaceable> flag are subject to change.
208 -->
209 <replaceable>-m</replaceable> オプションで指定するマウント、オプション、指定フォーマットは変更される可能性があります。
210 </para>
211 </refsect1>
212
213 <refsect1>
214
215 <title><!-- Options -->オプション</title>
216
217 <variablelist>
218
219 <varlistentry>
220 <term> <option>-N,--newname <replaceable>newname</replaceable></option> </term>
221 <listitem>
222 <para><!-- The name for the copy. -->コピー先のコンテナの名前。</para>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry>
227 <term> <option>-p,--newpath <replaceable>newpath</replaceable></option> </term>
228 <listitem>
229 <para><!-- The path for the copy. -->コピー先のパス。</para>
230 </listitem>
231 </varlistentry>
232
233 <varlistentry>
234 <term> <option>-R,--rename </option> </term>
235 <listitem>
236 <para><!-- Rename the original container. -->元のコンテナをリネームします。</para>
237 </listitem>
238 </varlistentry>
239
240 <varlistentry>
241 <term> <option>-s,--snapshot </option> </term>
242 <listitem>
e9555a6b 243 <para><!-- Create a snapshot of the original container. The backing
842948e4 244 storage for the copy must support snapshots. This currently includes
07a911c8
KY
245 btrfs, lvm, overlay, and zfs. -->
246 元のコンテナのスナップショットを作成します。コピー先のバッキングストレージがスナップショットをサポートしている必要があります。現時点では btrfs、lvm、overlay、zfs が対象となります。
842948e4
KY
247 </para>
248 </listitem>
249 </varlistentry>
250
251 <varlistentry>
252 <term> <option>-F,--foreground</option> </term>
253 <listitem>
254 <para><!-- Run the snapshot in the foreground. The snapshots console will
255 be attached to the current tty. (This option can only be specified
256 in conjunction with <replaceable>-e</replaceable>.) -->
257 スナップショットしたコンテナをフォアグラウンドで起動します。スナップショットしたコンテナのコンソールは現在の tty にアタッチされます。(このオプションは <replaceable>-e</replaceable> と同時の場合のみ指定できます。)
258 </para>
259 </listitem>
260 </varlistentry>
261
262 <varlistentry>
263 <term> <option>-d, --daemon</option> </term>
264 <listitem>
265 <para><!-- Run the snapshot as a daemon (This is the default mode for
266 ephemeral containers.). As the container has no more tty, if an
267 error occurs nothing will be displayed, the log file can
268 be used to check the error. (This option can only be specified in
269 conjunction with <replaceable>-e</replaceable>.) -->
270 スナップショットしたコンテナをデーモンで起動します (一時的なコンテナではこのモードがデフォルトです)。
271 コンテナは tty を持ちませんので、エラーが発生しても何も表示されません。エラーをチェックするにはログファイルを使います。(このオプションは <replaceable>-e</replaceable> と同時の場合のみ指定できます。)
272 </para>
273 </listitem>
274 </varlistentry>
275
276 <varlistentry>
277 <term> <option>-m, --mount <replaceable>mounttype</replaceable></option> </term>
278 <listitem>
279 <para><!-- Specify a mount for a snapshot The
280 <replaceable>opts</replaceable> argument for the mount type can by
07a911c8 281 of type {bind, overlay}. For example <option>-m
842948e4
KY
282 bind=/src:/dest:ro,overlay=/src:/dest</option> (This option can
283 currently only be specified in conjunction with
284 <replaceable>-e</replaceable>.). --></para>
07a911c8 285 スナップショットするコンテナで行うマウントを指定します。マウントタイプは {bind, overlay} のどれかで指定します。例えば <option>-m bind=/src:/dest:ro,overlay=/src:/dest</option> のようになります。(このオプションは <replaceable>-e</replaceable> と同時の場合のみ指定できます。)
842948e4
KY
286 </listitem>
287 </varlistentry>
288
53a92bbc
KY
289 <varlistentry>
290 <term> <option>-t, --tmpfs </option></term>
291 <listitem>
292 <para><!-- When this option is specified the ephemeral container will be
293 placed on a tmpfs. NOTE: Rebooting an ephemeral container that is
294 located on a tmpfs will currently cause all changes made to it to be
295 lost. This flag will only work for ephemeral containers created with
296 the <replaceable>-e</replaceable> flag. The original container, from
297 which the ephemeral snapshot is created, must be stored as a simple
298 directory. -->
299 このオプションを指定すると、一時的なコンテナを tmpfs 上に置きます。
300 注意: tmpfs 上に置かれた一時的なコンテナをリブートすると、コンテナに対して行ったすべての変更が失われます。
301 このフラグは <replaceable>-e</replaceable> オプションを指定して作成した一時的なコンテナに対してのみ有効です。一時的なスナップショットを作成する元のコンテナは、ディレクトリバックエンド上に存在しなければなりません。
302 </para> </listitem>
303 </varlistentry>
304
842948e4
KY
305 <varlistentry>
306 <term> <option>-B, --backingstorage <replaceable>backingstorage</replaceable></option></term>
307 <listitem>
308 <para><!-- Specify the backing storage type to be used for the copy
07a911c8 309 where 'backingstorage' is of type 'btrfs', 'dir', 'lvm', 'loop',
842948e4 310 'overlay', or 'zfs'. -->
06d06ad4 311 コピー先コンテナのバッキングストレージのタイプを指定します。ここで 'backingstorage' は 'btrfs'、'dir'、'lvm'、'loop'、'overlay'、'zfs' のどれかです。
842948e4
KY
312 </para>
313 </listitem>
314 </varlistentry>
315
316 <varlistentry>
317 <term> <option>-L, --fssize <replaceable>size [unit]</replaceable></option></term>
318 <listitem>
319 <para><!-- Specify the size for an 'lvm' filesystem. -->'lvm' ファイルシステムのサイズを指定します。</para>
320 </listitem>
321 </varlistentry>
322
53a92bbc
KY
323 <varlistentry>
324 <term> <option>-K, --keepname </option></term>
325 <listitem>
326 <para><!-- When this option is specified the hostname of the original
327 container will be kept for the copy. -->
328 このオプションを指定すると、元のコンテナのホスト名をコピー先でもそのまま使います。
329 </para>
330 </listitem>
331 </varlistentry>
332
842948e4
KY
333 <varlistentry>
334 <term> <option>-D, --keepdata </option></term>
335 <listitem>
336 <para><!-- When this option is specified with
337 <replaceable>-e</replaceable> a non-ephemeral container is created
338 and started. -->
339 <replaceable>-e</replaceable> オプションと同時にこのオプションを使うと、一時的でないコンテナを作成し、起動します。
340 </para>
341 </listitem>
342 </varlistentry>
343
842948e4
KY
344 <varlistentry>
345 <term> <option>-M, --keepmac </option></term>
346 <listitem>
347 <para><!-- When this option is specified the MAC address of the original
348 container will be kept for the copy. -->
349 このオプションを指定すると、元のコンテナの MAC アドレスをコピー先でもそのまま使います。
350 </para>
351 </listitem>
352 </varlistentry>
353
354 </variablelist>
355
356 </refsect1>
357
79dff39e
KY
358 <refsect1>
359 <title><!-- Copy hook -->コピー時のフック</title>
360 <para>
361 <!--
362 If the container being copied has one or more
363 <filename>lxc.hook.clone</filename> specified, then the specified hooks
364 will be called for the new container. The first 3 arguments passed to the
365 clone hook will be the container name, a section ('lxc'), and the hook
366 type ('clone'). Extra arguments passed to <command>lxc-copy</command> will
367 be passed to the hook program starting at argument 4. The
368 <filename>LXC_ROOTFS_MOUNT</filename> environment variable gives
369 the path under which the container's root filesystem is mounted. The
370 configuration file pathname is stored in
371 <filename>LXC_CONFIG_FILE</filename>, the new container name in
372 <filename>LXC_NAME</filename>, the old container name in
373 <filename>LXC_SRC_NAME</filename>, and the path or device on which the
374 rootfs is located is in <filename>LXC_ROOTFS_PATH</filename>.
375 -->
376 コピーされるコンテナに 1 つ以上の <filename>lxc.hook.clone</filename> の指定が存在する場合、指定されたフックは新しいコンテナに対して呼ばれます。
377 クローンフックに渡される最初の 3 つの引数は、コンテナ名、セクション ('lxc')、フックタイプ ('clone') となります。
378 <command>lxc-copy</command> に渡される追加の引数は、フックプログラムに渡される引数の 4 番目以降となります。
379 <filename>LXC_ROOTFS_MOUNT</filename> 環境変数には、コンテナの root ファイルシステムがマウントされるパスが与えられます。
380 設定ファイルのパス名は <filename>LXC_CONFIG_FILE</filename> に、新しいコンテナ名は <filename>LXC_NAME</filename>、古いコンテナ名は <filename>LXC_SRC_NAME</filename> に、rootfs のあるパスまたはデバイスは <filename>LXC_ROOTFS_PATH</filename> に保存されます。
381 </para>
382 </refsect1>
383
842948e4
KY
384 &commonoptions;
385
386 &seealso;
387
388 <refsect1>
389 <title>Author</title>
390 <para>Christian Brauner <email>christian.brauner@mailbox.org</email></para>
391 </refsect1>
392
393</refentry>
394
395<!-- Keep this comment at the end of the file
396Local variables:
397mode: sgml
398sgml-omittag:t
399sgml-shorttag:t
400sgml-minimize-attributes:nil
401sgml-always-quote-attributes:t
402sgml-indent-step:2
403sgml-indent-data:t
404sgml-parent-document:nil
405sgml-default-dtd-file:nil
406sgml-exposed-tags:nil
407sgml-local-catalogs:nil
408sgml-local-ecat-files:nil
409End:
410-->