'\" -*- coding: UTF-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH lxc-snapshot 1 2024-02-10 "" "" .SH NAME lxc-snapshot \- Snapshot an existing container. .SH SYNOPSIS 'nh .fi .ad l \*(T<\fBlxc\-snapshot\fR\*(T> \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu {-n, --name \fIname\fR} [-c, --comment \fIfile\fR] 'in \n(.iu-\nxu .ad b 'hy 'nh .fi .ad l \*(T<\fBlxc\-snapshot\fR\*(T> \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu {-n, --name \fIname\fR} {-d, -destroy \fIsnapshot-name\fR} 'in \n(.iu-\nxu .ad b 'hy 'nh .fi .ad l \*(T<\fBlxc\-snapshot\fR\*(T> \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu {-n, --name \fIname\fR} {-L, --list } [-C, --showcomments ] 'in \n(.iu-\nxu .ad b 'hy 'nh .fi .ad l \*(T<\fBlxc\-snapshot\fR\*(T> \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu {-n, --name \fIname\fR} {-r, -restore \fIsnapshot-name\fR} [-N, --newname \fInewname\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBlxc-snapshot\fR creates, lists, and restores container snapshots. .PP Snapshots are stored as snapshotted containers under the container's configuration path. For instance, if the container's configuration path is \*(T<\fI/var/lib/lxc\fR\*(T> and the container is \*(T<\fIc1\fR\*(T>, then the first snapshot will be stored as container \*(T<\fIsnap0\fR\*(T> under the path \*(T<\fI/var/lib/lxc/c1/snaps\fR\*(T>. If \*(T<\fI/var/lib/lxcsnaps\fR\*(T>, as used by LXC 1.0, already exists, then it will continue to be used. .SH OPTIONS .TP \*(T<\fB\-c,\-\-comment \fR\*(T>\fIcomment_file\fR Associate the comment in \fIcomment_file\fR with the newly created snapshot. .TP \*(T<\fB\-d,\-\-destroy snapshot\-name\fR\*(T> Destroy the named snapshot. If the named snapshot is ALL, then all snapshots will be destroyed. .TP \*(T<\fB\-L,\-\-list \fR\*(T> List existing snapshots. .TP \*(T<\fB\-C,\-\-showcomments \fR\*(T> Show snapshot comments in the snapshots listings. .TP \*(T<\fB\-r,\-\-restore snapshot\-name\fR\*(T> Restore the named snapshot, meaning a full new container is created which is a copy of the snapshot. .TP \*(T<\fB\-N, \-\-newname\fR\*(T> When restoring a snapshot, the last optional argument if not given explicitly via \fB--newname\fR 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. .SH "COMMON OPTIONS" These options are common to most of lxc commands. .TP \*(T<\fB\-?, \-h, \-\-help\fR\*(T> Print a longer usage message than normal. .TP \*(T<\fB\-\-usage\fR\*(T> Give the usage message .TP \*(T<\fB\-q, \-\-quiet\fR\*(T> mute on .TP \*(T<\fB\-P, \-\-lxcpath=\fR\*(T>\fIPATH\fR Use an alternate container path. The default is /var/lib/lxc. .TP \*(T<\fB\-o, \-\-logfile=\fR\*(T>\fIFILE\fR Output to an alternate log \fIFILE\fR. The default is no log. .TP \*(T<\fB\-l, \-\-logpriority=\fR\*(T>\fILEVEL\fR Set log priority to \fILEVEL\fR. The default log priority is \*(T. Possible values are : \*(T, \*(T, \*(T, \*(T, \*(T, \*(T, \*(T, \*(T, \*(T. Note that this option is setting the priority of the events log in the alternate log file. It do not have effect on the ERROR events log on stderr. .TP \*(T<\fB\-n, \-\-name=\fR\*(T>\fINAME\fR Use container identifier \fINAME\fR. The container identifier format is an alphanumeric string. .TP \*(T<\fB\-\-rcfile=\fR\*(T>\fIFILE\fR Specify the configuration file to configure the virtualization and isolation functionalities for the container. This configuration file if present will be used even if there is already a configuration file present in the previously created container (via lxc-create). .TP \*(T<\fB\-\-version\fR\*(T> Show the version number. .SH "SEE ALSO" \fBlxc\fR(7), \fBlxc-create\fR(1), \fBlxc-copy\fR(1), \fBlxc-destroy\fR(1), \fBlxc-start\fR(1), \fBlxc-stop\fR(1), \fBlxc-execute\fR(1), \fBlxc-console\fR(1), \fBlxc-monitor\fR(1), \fBlxc-wait\fR(1), \fBlxc-cgroup\fR(1), \fBlxc-ls\fR(1), \fBlxc-info\fR(1), \fBlxc-freeze\fR(1), \fBlxc-unfreeze\fR(1), \fBlxc-attach\fR(1), \fBlxc.conf\fR(5) .SH AUTHOR Serge Hallyn <\*(T>