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