<a id="lxc-snapshot-md"></a>

# `lxc snapshot`

Create instance snapshot

## Synopsis

Description:
Create instance snapshot

When –stateful is used, LXD attempts to checkpoint the instance’s
running state, including process memory state, TCP connections, …

```none
lxc snapshot [<remote>:]<instance> [<snapshot name>] [flags]
```

## Examples

```none
  lxc snapshot u1 snap0
  	Create a snapshot of "u1" called "snap0".

  	lxc snapshot u1 snap0 < config.yaml
  		Create a snapshot of "u1" called "snap0" with the configuration from "config.yaml".
```

## Options

```none
      --bitmap         Capture the existing bitmaps in the snapshot and create a bitmap named after the snapshot on every block volume of the snapshot, which requires a running virtual machine
      --disk-volumes   Disk volumes mode. Possible values are "root" (default) and "all-exclusive". "root" only snapshots the instance's root disk volume. "all-exclusive" snapshots the instance's root disk and any exclusively attached volumes (non-shared).
      --no-expiry      Ignore any configured auto-expiry for the instance
      --reuse          If the snapshot name already exists, delete and create a new one
      --stateful       Whether or not to snapshot the instance's running state
```

## Options inherited from parent commands

```none
      --debug          Show all debug messages
      --force-local    Force using the local unix socket
  -h, --help           Print help
      --project        Override the source project
  -q, --quiet          Do not show progress information
      --sub-commands   Use with help or --help to view sub-commands
  -v, --verbose        Show all information messages
      --version        Print version number
```

## SEE ALSO

* [lxc](https://canonical.com/lxd/docs/latest/reference/manpages/lxc/index.html.md#lxc-md)	 - Command line client for LXD
