Forrest logo
back to the lxc tool

lxc:tldr:cc946

lxc: Take a snapshot of a container.
$ lxc snapshot [${remote}:]${container} ${snapshot}
try on your machine

The command "lxc snapshot [${remote}:]${container} ${snapshot}" is used in Linux to create a snapshot of an LXC (Linux Container) instance.

Here's what each part of the command means:

  • "lxc snapshot": This is the main command that initiates the snapshot creation process.
  • "[${remote}:]${container}": This specifies the container for which the snapshot will be created. The "remote" portion is optional, and if specified, it refers to a remote LXD server where the container exists. If not specified, it assumes the container is local.
  • "${snapshot}": This provides the name for the snapshot that will be created. The snapshot name helps identify it later when managing or restoring snapshots.

By running this command, the program responsible for managing LXC (usually LXD) will create a copy of the container's current state and save it as a snapshot. Snapshots are useful for capturing a point-in-time copy of the container's file system and can be used for backup purposes, easy recovery, or for creating clones of containers.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lxc tool