1lxc-snapshot(1) lxc-snapshot(1)
2
3
4
6 lxc-snapshot - Snapshot an existing container.
7
9 lxc-snapshot {-n, --name name} [-c, --comment file]
10 lxc-snapshot {-n, --name name} {-d, -destroy snapshot-name}
11 lxc-snapshot {-n, --name name} {-L, --list } [-C, --showcomments ]
12 lxc-snapshot {-n, --name name} {-r, -restore snapshot-name} [-N,
13 --newname newname]
14
16 lxc-snapshot creates, lists, and restores container snapshots.
17
18 Snapshots are stored as snapshotted containers under the container's
19 configuration path. For instance, if the container's configuration path
20 is /var/lib/lxc and the container is c1, then the first snapshot will
21 be stored as container snap0 under the path /var/lib/lxc/c1/snaps. If
22 /var/lib/lxcsnaps, as used by LXC 1.0, already exists, then it will
23 continue to be used.
24
26 -c,--comment comment_file
27 Associate the comment in comment_file with the newly created
28 snapshot.
29
30 -d,--destroy snapshot-name
31 Destroy the named snapshot. If the named snapshot is ALL, then
32 all snapshots will be destroyed.
33
34 -L,--list
35 List existing snapshots.
36
37 -C,--showcomments
38 Show snapshot comments in the snapshots listings.
39
40 -r,--restore snapshot-name
41 Restore the named snapshot, meaning a full new container is cre‐
42 ated which is a copy of the snapshot.
43
44 -N, --newname
45 When restoring a snapshot, the last optional argument if not
46 given explicitly via --newname is the name to use for the re‐
47 stored container. If the newname is identical to the original
48 name of the container, then the original container will be de‐
49 stroyed and the restored container will take its place. Note
50 that deleting the original snapshot is not possible in the case
51 of overlayfs or zfs backed snapshots.
52
54 These options are common to most of lxc commands.
55
56 -?, -h, --help
57 Print a longer usage message than normal.
58
59 --usage
60 Give the usage message
61
62 -q, --quiet
63 mute on
64
65 -P, --lxcpath=PATH
66 Use an alternate container path. The default is /var/lib/lxc.
67
68 -o, --logfile=FILE
69 Output to an alternate log FILE. The default is no log.
70
71 -l, --logpriority=LEVEL
72 Set log priority to LEVEL. The default log priority is ERROR.
73 Possible values are : FATAL, ALERT, CRIT, WARN, ERROR, NOTICE,
74 INFO, DEBUG, TRACE.
75
76 Note that this option is setting the priority of the events log
77 in the alternate log file. It do not have effect on the ERROR
78 events log on stderr.
79
80 -n, --name=NAME
81 Use container identifier NAME. The container identifier format
82 is an alphanumeric string.
83
84 --rcfile=FILE
85 Specify the configuration file to configure the virtualization
86 and isolation functionalities for the container.
87
88 This configuration file if present will be used even if there is
89 already a configuration file present in the previously created
90 container (via lxc-create).
91
92 --version
93 Show the version number.
94
96 lxc(7), lxc-create(1), lxc-copy(1), lxc-destroy(1), lxc-start(1), lxc-
97 stop(1), lxc-execute(1), lxc-console(1), lxc-monitor(1), lxc-wait(1),
98 lxc-cgroup(1), lxc-ls(1), lxc-info(1), lxc-freeze(1), lxc-unfreeze(1),
99 lxc-attach(1), lxc.conf(5)
100
102 Serge Hallyn <serge.hallyn@ubuntu.com >
103
104
105
106 2021-09-18 lxc-snapshot(1)