]> git.proxmox.com Git - mirror_lxc.git/blob - doc/lxc-snapshot.sgml.in
af_unix: add lxc_abstract_unix_send_fds_iov
[mirror_lxc.git] / doc / lxc-snapshot.sgml.in
1 <!--
2
3 lxc: linux Container library
4
5 (C) Copyright Canonical Inc. 2007, 2008
6
7 Authors:
8 Serge Hallyn <serge.hallyn at ubuntu.com>
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 -->
25
26 <!DOCTYPE refentry PUBLIC @docdtd@ [
27
28 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
29 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
30 ]>
31
32 <refentry>
33
34 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
35
36 <refmeta>
37 <refentrytitle>lxc-snapshot</refentrytitle>
38 <manvolnum>1</manvolnum>
39 </refmeta>
40
41 <refnamediv>
42 <refname>lxc-snapshot</refname>
43
44 <refpurpose>
45 Snapshot an existing container.
46 </refpurpose>
47 </refnamediv>
48
49 <refsynopsisdiv>
50 <cmdsynopsis>
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>
54 </cmdsynopsis>
55 <cmdsynopsis>
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>
59 </cmdsynopsis>
60 <cmdsynopsis>
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>
65 </cmdsynopsis>
66 <cmdsynopsis>
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>
71 </cmdsynopsis>
72 </refsynopsisdiv>
73
74 <refsect1>
75 <title>Description</title>
76
77 <para>
78 <command>lxc-snapshot</command> creates, lists, and restores
79 container snapshots.
80 </para>
81 <para>
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.
84 </para>
85 </refsect1>
86
87 <refsect1>
88
89 <title>Options</title>
90
91 <variablelist>
92
93 <varlistentry>
94 <term> <option>-c,--comment <replaceable>comment_file</replaceable></option> </term>
95 <listitem>
96 <para> Associate the comment in <replaceable>comment_file</replaceable> with the newly created snapshot.</para>
97 </listitem>
98 </varlistentry>
99
100 <varlistentry>
101 <term> <option>-d,--destroy snapshot-name</option> </term>
102 <listitem>
103 <para> Destroy the named snapshot. If the named snapshot is ALL, then all snapshots
104 will be destroyed.</para>
105 </listitem>
106 </varlistentry>
107
108 <varlistentry>
109 <term> <option>-L,--list </option> </term>
110 <listitem>
111 <para> List existing snapshots. </para>
112 </listitem>
113 </varlistentry>
114
115 <varlistentry>
116 <term> <option>-C,--showcomments </option> </term>
117 <listitem>
118 <para> Show snapshot comments in the snapshots listings. </para>
119 </listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term> <option>-r,--restore snapshot-name</option> </term>
124 <listitem>
125 <para> Restore the named snapshot, meaning a full new container is created which is a copy of the snapshot.</para>
126 </listitem>
127 </varlistentry>
128
129 <varlistentry>
130 <term> <option>-N, --newname</option> </term>
131 <listitem>
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>
133 </listitem>
134 </varlistentry>
135
136 </variablelist>
137
138 </refsect1>
139
140 &commonoptions;
141
142 &seealso;
143
144 <refsect1>
145 <title>Author</title>
146 <para>Serge Hallyn <email>serge.hallyn@ubuntu.com </email></para>
147 </refsect1>
148
149 </refentry>
150
151 <!-- Keep this comment at the end of the file
152 Local variables:
153 mode: sgml
154 sgml-omittag:t
155 sgml-shorttag:t
156 sgml-minimize-attributes:nil
157 sgml-always-quote-attributes:t
158 sgml-indent-step:2
159 sgml-indent-data: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
165 End:
166 -->