3
lxc: linux Container library
5
(C) Copyright IBM Corp. 2007, 2008
8
Daniel Lezcano <dlezcano at fr.ibm.com>
9
Serge Hallyn <serge.hallyn at ubuntu.com>
11
This library is free software; you can redistribute it and/or
12
modify it under the terms of the GNU Lesser General Public
13
License as published by the Free Software Foundation; either
14
version 2.1 of the License, or (at your option) any later version.
16
This library is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
Lesser General Public License for more details.
21
You should have received a copy of the GNU Lesser General Public
22
License along with this library; if not, write to the Free Software
23
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
29
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
30
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
35
<docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
38
<refentrytitle>lxc-clone</refentrytitle>
39
<manvolnum>1</manvolnum>
43
<refname>lxc-clone</refname>
46
clone a new container from an existing one.
52
<command>lxc-clone</command>
53
<arg choice="req">-o <replaceable>orig</replaceable></arg>
54
<arg choice="req">-n <replaceable>new</replaceable></arg>
55
<arg choice="opt">-s </arg>
56
<arg choice="opt">-L <replaceable>fssize</replaceable></arg>
57
<arg choice="opt">-v <replaceable>vgname</replaceable></arg>
58
<arg choice="opt">-p <replaceable>lxc_lv_prefix</replaceable></arg>
59
<arg choice="opt">-t <replaceable>fstype</replaceable></arg>
64
<title>Description</title>
67
<command>lxc-clone</command> Creates a new container as a copy of an existing
68
container. When the original container's rootfs is an LVM block device or
69
is on a btrfs filesystem, then a snapshotted clone can be created, taking up
70
very little initial disk space.
77
<title>Options</title>
83
<option>-o, --orig <replaceable>orig</replaceable></option>
87
The name of the original container to clone.
94
<option>-n, --new <replaceable>new</replaceable></option>
98
The name of the new container to create.
105
<option>-s, --snapshot</option>
109
The new container's rootfs should be a LVM or btrfs snapshot of the original.
116
<option>-L, --fssize <replaceable>fssize</replaceable></option>
120
In the case of a LVM-backed container, a size for the new
121
block device. By default, the new device will be made the
122
same size as the original.
129
<option>-v, --vgname <replaceable>vgname</replaceable></option>
133
For an LVM-backed container, the volume group name to use. By
141
<option>-p, --lvprefix <replaceable>lxc_lv_prefix</replaceable></option>
145
For an LVM-backed container, a string to prefix to the container name to
146
form the logical volume name. For instance, specifying
147
<command>-n c1 -p lxc_</command> will cause the container rootfs to
148
be on a logical volume called <replaceable>lxc_c1</replaceable>.
155
<option>-t, --fstype <replaceable>fstype</replaceable></option>
159
For a non-snapshot LVM clone, the file system to use for the new
160
container. Note this option is ignored when requesting a
161
snapshotted container.
173
<title>Author</title>
174
<para>Serge Hallyn <email>serge.hallyn@ubuntu.com</email></para>
179
<!-- Keep this comment at the end of the file
184
sgml-minimize-attributes:nil
185
sgml-always-quote-attributes:t
188
sgml-parent-document:nil
189
sgml-default-dtd-file:nil
190
sgml-exposed-tags:nil
191
sgml-local-catalogs:nil
192
sgml-local-ecat-files:nil