lxc-snapshot.sgml.in revision a9b21284fceafaf57b1bb58cf59f939dcf68141a
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher<!--
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagherlxc: linux Container library
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher(C) Copyright Canonical Inc. 2007, 2008
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher
2ea6196484055397cc4bc011c5960f790431fa9dStephen GallagherAuthors:
2ea6196484055397cc4bc011c5960f790431fa9dStephen GallagherSerge Hallyn <serge.hallyn at ubuntu.com>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen GallagherThis library is free software; you can redistribute it and/or
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghermodify it under the terms of the GNU Lesser General Public
52261fe16203dec6e6f69177c6d0a810b47d073fStephen GallagherLicense as published by the Free Software Foundation; either
6463ed1dcdd45416468b3fa178bd856b5a9ed2c3Jakub Hrozekversion 2.1 of the License, or (at your option) any later version.
6463ed1dcdd45416468b3fa178bd856b5a9ed2c3Jakub Hrozek
6463ed1dcdd45416468b3fa178bd856b5a9ed2c3Jakub HrozekThis library is distributed in the hope that it will be useful,
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagherbut WITHOUT ANY WARRANTY; without even the implied warranty of
52261fe16203dec6e6f69177c6d0a810b47d073fStephen GallagherMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
52261fe16203dec6e6f69177c6d0a810b47d073fStephen GallagherLesser General Public License for more details.
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen GallagherYou should have received a copy of the GNU Lesser General Public
7a14e8f66c0e932fe2954d792614a3b61d444bd1Jakub HrozekLicense along with this library; if not, write to the Free Software
52261fe16203dec6e6f69177c6d0a810b47d073fStephen GallagherFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher-->
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek<!DOCTYPE refentry PUBLIC @docdtd@ [
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek]>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher<refentry>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <refmeta>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <refentrytitle>lxc-snapshot</refentrytitle>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <manvolnum>1</manvolnum>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </refmeta>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <refnamediv>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <refname>lxc-snapshot</refname>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <refpurpose>
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek Snapshot an existing container.
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </refpurpose>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher </refnamediv>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <refsynopsisdiv>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <cmdsynopsis>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <command>lxc-snapshot</command>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <arg choice="opt">-c, --comment <replaceable>file</replaceable></arg>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </cmdsynopsis>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <cmdsynopsis>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <command>lxc-snapshot</command>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <arg choice="req">-d, -destroy <replaceable>snapshot-name</replaceable></arg>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </cmdsynopsis>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <cmdsynopsis>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <command>lxc-snapshot</command>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <arg choice="req">-L, --list </arg>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <arg choice="opt">-C, --showcomments </arg>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </cmdsynopsis>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <cmdsynopsis>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <command>lxc-snapshot</command>
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek <arg choice="req">-r, -restore <replaceable>snapshot-name</replaceable></arg>
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek <arg choice="opt"> <replaceable> newname</replaceable></arg>
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek </cmdsynopsis>
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek </refsynopsisdiv>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <refsect1>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <title>Description</title>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <command>lxc-snapshot</command> creates, lists, and restores
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher container snapshots.
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher Snapshots are stored as snapshotted containers under the container's configuration path. For instance, if the container's configuration path is <filename>/var/lib/lxc</filename> and the container is <filename>c1</filename>, then the first snapshot will be stored as container <filename>snap0</filename> under the path <filename>/var/lib/lxc/c1/snaps</filename>.
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher If <filename>/var/lib/lxcsnaps</filename>, as used by LXC 1.0, already exists, then it will continue to be used.
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher </para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </refsect1>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <refsect1>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <title>Options</title>
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek
ea929f1b022fc2cb77dec89b0e12accef983ec85Jakub Hrozek <variablelist>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <varlistentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <term> <option>-c,--comment <replaceable>comment_file</replaceable></option> </term>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <para> Associate the comment in <replaceable>comment_file</replaceable> with the newly created snapshot.</para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </varlistentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <varlistentry>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <term> <option>-d,--destroy snapshot-name</option> </term>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <para> Destroy the named snapshot. If the named snapshot is ALL, then all snapshots
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher will be destroyed.</para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </varlistentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <varlistentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <term> <option>-L,--list </option> </term>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <listitem>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <para> List existing snapshots. </para>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher </listitem>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher </varlistentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <varlistentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <term> <option>-C,--showcomments </option> </term>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <para> Show snapshot comments in the snapshots listings. </para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </varlistentry>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <varlistentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <term> <option>-r,--restore snapshot-name</option> </term>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <para> Restore the named snapshot, meaning a full new container is created which is a copy of the snapshot.</para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </varlistentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <varlistentry>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <term> <option>newname</option> </term>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher <listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <para> When restoring a snapshot, the last optional argument is the name to use for the restored container. If no name is given, then the original container will be destroyed and the restored container will take its place. Note that deleting the original snapshot is not possible in the case of aufs, overlayfs or zfs backed snapshots.</para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </listitem>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </varlistentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher </variablelist>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </refsect1>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek &commonoptions;
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher &seealso;
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <refsect1>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher <title>Author</title>
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek <para>Serge Hallyn <email>serge.hallyn@ubuntu.com </email></para>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher </refsect1>
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher</refentry>
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher<!-- Keep this comment at the end of the file
6463ed1dcdd45416468b3fa178bd856b5a9ed2c3Jakub HrozekLocal variables:
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghermode: sgml
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallaghersgml-omittag:t
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghersgml-shorttag:t
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghersgml-minimize-attributes:nil
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghersgml-always-quote-attributes:t
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghersgml-indent-step:2
2ea6196484055397cc4bc011c5960f790431fa9dStephen Gallaghersgml-indent-data:t
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghersgml-parent-document:nil
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghersgml-default-dtd-file:nil
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghersgml-exposed-tags:nil
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghersgml-local-catalogs:nil
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallaghersgml-local-ecat-files:nil
52261fe16203dec6e6f69177c6d0a810b47d073fStephen GallagherEnd:
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher-->
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher