Debian Codegraph @

doc/lxc-snapshot.sgml.in

raw
1 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
2
3 <!DOCTYPE refentry PUBLIC @docdtd@ [
4
5 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
6 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
7 ]>
8
9 <refentry>
10
11 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
12
13 <refmeta>
14 <refentrytitle>lxc-snapshot</refentrytitle>
15 <manvolnum>1</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>lxc-snapshot</refname>
20
21 <refpurpose>
22 Snapshot an existing container.
23 </refpurpose>
24 </refnamediv>
25
26 <refsynopsisdiv>
27 <cmdsynopsis>
28 <command>lxc-snapshot</command>
29 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
30 <arg choice="opt">-c, --comment <replaceable>file</replaceable></arg>
31 </cmdsynopsis>
32 <cmdsynopsis>
33 <command>lxc-snapshot</command>
34 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
35 <arg choice="req">-d, -destroy <replaceable>snapshot-name</replaceable></arg>
36 </cmdsynopsis>
37 <cmdsynopsis>
38 <command>lxc-snapshot</command>
39 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
40 <arg choice="req">-L, --list </arg>
41 <arg choice="opt">-C, --showcomments </arg>
42 </cmdsynopsis>
43 <cmdsynopsis>
44 <command>lxc-snapshot</command>
45 <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
46 <arg choice="req">-r, -restore <replaceable>snapshot-name</replaceable></arg>
47 <arg choice="opt">-N, --newname <replaceable> newname</replaceable></arg>
48 </cmdsynopsis>
49 </refsynopsisdiv>
50
51 <refsect1>
52 <title>Description</title>
53
54 <para>
55 <command>lxc-snapshot</command> creates, lists, and restores
56 container snapshots.
57 </para>
58 <para>
59 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>.
60 If <filename>/var/lib/lxcsnaps</filename>, as used by LXC 1.0, already exists, then it will continue to be used.
61 </para>
62 </refsect1>
63
64 <refsect1>
65
66 <title>Options</title>
67
68 <variablelist>
69
70 <varlistentry>
71 <term> <option>-c,--comment <replaceable>comment_file</replaceable></option> </term>
72 <listitem>
73 <para> Associate the comment in <replaceable>comment_file</replaceable> with the newly created snapshot.</para>
74 </listitem>
75 </varlistentry>
76
77 <varlistentry>
78 <term> <option>-d,--destroy snapshot-name</option> </term>
79 <listitem>
80 <para> Destroy the named snapshot. If the named snapshot is ALL, then all snapshots
81 will be destroyed.</para>
82 </listitem>
83 </varlistentry>
84
85 <varlistentry>
86 <term> <option>-L,--list </option> </term>
87 <listitem>
88 <para> List existing snapshots. </para>
89 </listitem>
90 </varlistentry>
91
92 <varlistentry>
93 <term> <option>-C,--showcomments </option> </term>
94 <listitem>
95 <para> Show snapshot comments in the snapshots listings. </para>
96 </listitem>
97 </varlistentry>
98
99 <varlistentry>
100 <term> <option>-r,--restore snapshot-name</option> </term>
101 <listitem>
102 <para> Restore the named snapshot, meaning a full new container is created which is a copy of the snapshot.</para>
103 </listitem>
104 </varlistentry>
105
106 <varlistentry>
107 <term> <option>-N, --newname</option> </term>
108 <listitem>
109 <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>
110 </listitem>
111 </varlistentry>
112
113 </variablelist>
114
115 </refsect1>
116
117 &commonoptions;
118
119 &seealso;
120
121 </refentry>
122
123 <!-- Keep this comment at the end of the file
124 Local variables:
125 mode: sgml
126 sgml-omittag:t
127 sgml-shorttag:t
128 sgml-minimize-attributes:nil
129 sgml-always-quote-attributes:t
130 sgml-indent-step:2
131 sgml-indent-data:t
132 sgml-parent-document:nil
133 sgml-default-dtd-file:nil
134 sgml-exposed-tags:nil
135 sgml-local-catalogs:nil
136 sgml-local-ecat-files:nil
137 End:
138 -->