3 lxc: linux Container library
5 (C) Copyright Canonical Inc. 2007, 2008
8 Serge Hallyn <serge.hallyn at ubuntu.com>
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.
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.
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
26 <!DOCTYPE refentry PUBLIC @docdtd@ [
28 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
29 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
34 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
37 <refentrytitle>lxc-snapshot</refentrytitle>
38 <manvolnum>1</manvolnum>
42 <refname>lxc-snapshot</refname>
45 Snapshot an existing container.
51 <command>lxc-snapshot</command>
52 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
53 <arg choice="opt">-c, --comment <replaceable>file</replaceable></arg>
56 <command>lxc-snapshot</command>
57 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
58 <arg choice="req">-d, -destroy <replaceable>snapshot-name</replaceable></arg>
61 <command>lxc-snapshot</command>
62 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
63 <arg choice="req">-L, --list </arg>
64 <arg choice="opt">-C, --showcomments </arg>
67 <command>lxc-snapshot</command>
68 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
69 <arg choice="req">-r, -restore <replaceable>snapshot-name</replaceable></arg>
70 <arg choice="opt">-N, --newname <replaceable> newname</replaceable></arg>
75 <title>Description</title>
78 <command>lxc-snapshot</command> creates, lists, and restores
82 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>.
83 If <filename>/var/lib/lxcsnaps</filename>, as used by LXC 1.0, already exists, then it will continue to be used.
89 <title>Options</title>
94 <term> <option>-c,--comment <replaceable>comment_file</replaceable></option> </term>
96 <para> Associate the comment in <replaceable>comment_file</replaceable> with the newly created snapshot.</para>
101 <term> <option>-d,--destroy snapshot-name</option> </term>
103 <para> Destroy the named snapshot. If the named snapshot is ALL, then all snapshots
104 will be destroyed.</para>
109 <term> <option>-L,--list </option> </term>
111 <para> List existing snapshots. </para>
116 <term> <option>-C,--showcomments </option> </term>
118 <para> Show snapshot comments in the snapshots listings. </para>
123 <term> <option>-r,--restore snapshot-name</option> </term>
125 <para> Restore the named snapshot, meaning a full new container is created which is a copy of the snapshot.</para>
130 <term> <option>-N, --newname</option> </term>
132 <para> When restoring a snapshot, the last optional argument if not given explicitly via <command>--newname</command> is the name to use for the restored container. If the newname is identical to the original name of the container, 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 overlayfs or zfs backed snapshots.</para>
145 <title>Author</title>
146 <para>Serge Hallyn <email>serge.hallyn@ubuntu.com </email></para>
151 <!-- Keep this comment at the end of the file
156 sgml-minimize-attributes:nil
157 sgml-always-quote-attributes:t
160 sgml-parent-document:nil
161 sgml-default-dtd-file:nil
162 sgml-exposed-tags:nil
163 sgml-local-catalogs:nil
164 sgml-local-ecat-files:nil