lxc-copy.sgml.in revision cc0607a9315c5f26a0840aaf410d54457706492c
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher<!--
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagherlxc: linux Container library
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher(C) Copyright Canonical Inc. 2007, 2008
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherAuthors:
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherChristian Brauner <christian.brauner at mailbox.org>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherThis library is free software; you can redistribute it and/or
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallaghermodify it under the terms of the GNU Lesser General Public
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherLicense as published by the Free Software Foundation; either
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagherversion 2.1 of the License, or (at your option) any later version.
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherThis library is distributed in the hope that it will be useful,
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagherbut WITHOUT ANY WARRANTY; without even the implied warranty of
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherLesser General Public License for more details.
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherYou should have received a copy of the GNU Lesser General Public
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherLicense along with this library; if not, write to the Free Software
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher-->
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher<!DOCTYPE refentry PUBLIC @docdtd@ [
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny]>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher<refentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <refmeta>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <refentrytitle>lxc-copy</refentrytitle>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <manvolnum>1</manvolnum>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </refmeta>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <refnamediv>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <refname>lxc-copy</refname>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <refpurpose>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny copy an existing container.
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </refpurpose>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </refnamediv>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <refsynopsisdiv>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <cmdsynopsis>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <command>lxc-copy</command>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-P, --lxcpath <replaceable>path</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="req">-N, --newname <replaceable>newname</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-p, --newpath <replaceable>newpath</replaceable></arg>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <arg choice="opt">-B, --backingstorage <replaceable>backingstorage</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-s, --snapshot</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-K, --keepdata</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-M, --keepmac</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-L, --fssize <replaceable>size [unit]</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-- hook arguments</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </cmdsynopsis>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <cmdsynopsis>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <command>lxc-copy</command>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-P, --lxcpath <replaceable>path</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-N, --newname <replaceable>newname</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-p, --newpath <replaceable>newpath</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="req">-e, --ephemeral</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-B, --backingstorage <replaceable>backingstorage</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-s, --snapshot</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-K, --keepdata</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-M, --keepmac</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-L, --fssize <replaceable>size [unit]</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-- hook arguments</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </cmdsynopsis>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <cmdsynopsis>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <command>lxc-copy</command>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-P, --lxcpath <replaceable>path</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="req">-N, --newname <replaceable>newname</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="opt">-p, --newpath <replaceable>newpath</replaceable></arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <arg choice="req">-R, --rename</arg>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </cmdsynopsis>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </refsynopsisdiv>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <refsect1>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <title>Description</title>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <command>lxc-copy</command> creates and optionally starts (ephemeral or
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher non-ephemeral) copies of existing containers. It replaces
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <command>lxc-clone</command> and <command>lxc-start-ephemeral</command>.
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <command>lxc-copy</command> creates copies of existing containers. Copies
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny can be complete clones of the original container. In this case the whole
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny root filesystem of the container is simply copied to the new container. Or
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny they can be snapshots, i.e. small copy-on-write copies of the original
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny container. In this case the specified backing storage for the copy must
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny support snapshots. This currently includes aufs, btrfs, lvm (lvm devices
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny do not support snapshots of snapshots.), overlay, and zfs.
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny The copy's backing storage will be of the same type as the original
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny container. aufs or overlayfs snapshots of directory backed containers are
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny exempted from this rule.
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny When the <replaceable>-e</replaceable> flag is specified an ephemeral
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny snapshot of the original container is created and started. Ephemeral
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny containers will have <command>lxc.ephemeral = 1</command> set in their
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny config file and will be destroyed on shutdown. When
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <replaceable>-e</replaceable> is used in combination with
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <replaceable>-D</replaceable> a non-ephemeral snapshot of the original
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher container is created and started.</para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher When <replaceable>-e</replaceable> is specified and no newname is given via
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <replaceable>-N</replaceable> a random name for the snapshot will be chosen.
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher Containers created and started with <replaceable>-e</replaceable> can have
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher custom mounts. These are specified with the <replaceable>-m</replaceable>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher flag. Currently three types of mounts are supported:
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <replaceable>aufs</replaceable>, <replaceable>bind</replaceable>, and
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <replaceable>overlay</replaceable>. Mount types are specified as suboptions
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher to the <replaceable>-m</replaceable> flag and can be specified multiple
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher times separated by commas. <replaceable>aufs</replaceable> and
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <replaceable>overlay</replaceable> mounts are currently specified in the
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher format <replaceable>-m overlay=/src:/dest</replaceable>. When no
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher destination <replaceable>dest</replaceable> is specified
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <replaceable>dest</replaceable> will be identical to
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <replaceable>src</replaceable>. Read-only <replaceable>bind</replaceable>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher mounts are specified <replaceable>-m bind=/src:/dest:ro</replaceable> and
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher read-write <replaceable>bind</replaceable> mounts <replaceable>-m
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher bind=/src:/dest:rw</replaceable>. Read-write <replaceable>bind</replaceable>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher mounts are the default and <replaceable>rw</replaceable> can be missing when
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher a read-write mount is wanted. When <replaceable>dest</replaceable> is
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher missing <replaceable>dest</replaceable> will be identical to
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <replaceable>src</replaceable>. An example for multiple mounts would be
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <replaceable>-m
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher bind=/src1:/dest1:ro,bind=/src2:ro,overlay=/src3:/dest3</replaceable>.
4a6a5421113ab662a665c62ed6a24b61a5a36950Jakub Hrozek </para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher The mounts, their options, and formats supported via the
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <replaceable>-m</replaceable> flag are subject to change.
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </refsect1>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <refsect1>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <title>Options</title>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <variablelist>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <term> <option>-N,--newname <replaceable>newname</replaceable></option> </term>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para>The name for the copy.</para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <term> <option>-p,--newpath <replaceable>newpath</replaceable></option> </term>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para>The path for the copy.</para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <term> <option>-R,--rename </option> </term>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <para>Rename the original container. </para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <term> <option>-s,--snapshot </option> </term>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <para> Create a snapshot of the orginal container. The backing
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher storage for the copy must support snapshots. This currently includes
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher aufs, btrfs, lvm, overlay, and zfs. </para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <term> <option>-F,--foreground</option> </term>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para>Run the snapshot in the foreground. The snapshots console will
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher be attached to the current tty. (This option can only be specified
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher in conjunction with <replaceable>-e</replaceable>.)
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </para>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <term> <option>-d, --daemon</option> </term>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para> Run the snapshot as a daemon (This is the default mode for
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher ephemeral containers.). As the container has no more tty, if an
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher error occurs nothing will be displayed, the log file can
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny be used to check the error. (This option can only be specified in
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny conjunction with <replaceable>-e</replaceable>.)
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <term> <option>-m, --mount <replaceable>mounttype</replaceable></option> </term>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <para> Specify a mount for a snapshot The
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <replaceable>opts</replaceable> argument for the mount type can by
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny of type {aufs, bind, overlay}. For example <option>-m
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny bind=/src:/dest:ro,overlay=/src:/dest</option> (This option can
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny currently only be specified in conjunction with
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <replaceable>-e</replaceable>.).</para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <term> <option>-B, --backingstorage <replaceable>backingstorage</replaceable></option></term>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <para>Specify the backing storage type to be used for the copy
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny where 'backingstorage' is of type 'aufs', 'btrfs', 'dir', 'lvm', 'loop',
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny 'overlay', or 'zfs'. </para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <term> <option>-L, --fssize <replaceable>size [unit]</replaceable></option></term>
2f3ee3f49019f5b60adbe073070f31e6e2d7c7abStephen Gallagher <listitem>
2f3ee3f49019f5b60adbe073070f31e6e2d7c7abStephen Gallagher <para>Specify the size for an 'lvm' filesystem. </para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <term> <option>-D, --keepdata </option></term>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <para>When this option is specified with
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <replaceable>-e</replaceable> a non-ephemeral container is created
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny and started. </para> </listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <varlistentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <term> <option>-K, --keepname </option></term>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para> When this option is specified the hostname of the original
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher container will be kept for the copy.</para> </listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <term> <option>-M, --keepmac </option></term>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <listitem>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <para> When this option is specified the MAC address of the original
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher container will be kept for the copy.</para> </listitem>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </varlistentry>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </variablelist>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher </refsect1>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <refsect1>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <title>Copy hook</title>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny If the container being copied has one or more
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <filename>lxc.hook.clone</filename> specified, then the specified hooks
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny will be called for the new container. The first 3 arguments passed to the
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny clone hook will be the container name, a section ('lxc'), and the hook
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny type ('clone'). Extra arguments passed to <command>lxc-copy</command> will
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny be passed to the hook program starting at argument 4. The
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <filename>LXC_ROOTFS_MOUNT</filename> environment variable gives
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny the path under which the container's root filesystem is mounted. The
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny configuration file pathname is stored in
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <filename>LXC_CONFIG_FILE</filename>, the new container name in
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <filename>LXC_NAME</filename>, the old container name in
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <filename>LXC_SRC_NAME</filename>, and the path or device on which the
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny rootfs is located is in <filename>LXC_ROOTFS_PATH</filename>.
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </refsect1>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny &commonoptions;
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny &seealso;
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <refsect1>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny <title>Author</title>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher <para>Christian Brauner <email>christian.brauner@mailbox.org</email></para>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny </refsect1>
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny
71ad247500b417836a1a2edec257a4433a7c415fJan Zeleny</refentry>
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher<!-- Keep this comment at the end of the file
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherLocal variables:
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallaghermode: sgml
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallaghersgml-omittag:t
71ad247500b417836a1a2edec257a4433a7c415fJan Zelenysgml-shorttag:t
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallaghersgml-minimize-attributes:nil
71ad247500b417836a1a2edec257a4433a7c415fJan Zelenysgml-always-quote-attributes:t
71ad247500b417836a1a2edec257a4433a7c415fJan Zelenysgml-indent-step:2
71ad247500b417836a1a2edec257a4433a7c415fJan Zelenysgml-indent-data:t
71ad247500b417836a1a2edec257a4433a7c415fJan Zelenysgml-parent-document:nil
71ad247500b417836a1a2edec257a4433a7c415fJan Zelenysgml-default-dtd-file:nil
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallaghersgml-exposed-tags:nil
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallaghersgml-local-catalogs:nil
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallaghersgml-local-ecat-files:nil
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen GallagherEnd:
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher-->
e134a6af42102c8d865e82bf89e0b8c5a40fb5faStephen Gallagher