# spin snapshot

**Spinbox is experimental: APIs change and data may be lost.** What is built and what proves it is on [Status](https://spin-stack.github.io/website/reference/status.md); what Spinbox does not do is on [Limitations](https://spin-stack.github.io/website/overview/limitations.md).

> spin snapshot: Take, list and delete a workspace's snapshots.

<!-- Generated by tools/refgen from spin:cmd/cli. Edit the source, not this file. -->

```
Take, list and delete a workspace's snapshots

Usage:
  spin snapshot [flags]
  spin snapshot [command]

Aliases:
  snapshot, snap

Available Commands:
  create      Snapshot a running workspace's disk
  delete      Delete a snapshot
  diff        List what changed in a workspace's files between two snapshots
  list        List a workspace's snapshots, including those of disks it was restored away from

Flags:
  -h, --help   help for snapshot

Global Flags:
      --config string    config file (default is $HOME/.spin/config.yaml)
  -o, --output string    text for a person, or json: one document of what the API answered, and no prose (default "text")
      --profile string   named profile to use; SPIN_PROFILE names it when this flag does not (default "default")

Use "spin snapshot [command] --help" for more information about a command.
```

### spin snapshot create

```
Snapshot a running workspace's disk. The snapshot is usable once it is published: the
host seals the disk at this moment and uploads what changed since the last snapshot. --wait
returns once it is.

Usage:
  spin snapshot create <workspace> [flags]

Flags:
      --description string   What the snapshot is of
  -h, --help                 help for create
      --timeout duration     How long --wait waits (default 5m0s)
      --wait                 Return once the snapshot is published
      --with-memory          Keep the running processes too, so a restore resumes them

Global Flags:
      --config string    config file (default is $HOME/.spin/config.yaml)
  -o, --output string    text for a person, or json: one document of what the API answered, and no prose (default "text")
      --profile string   named profile to use; SPIN_PROFILE names it when this flag does not (default "default")
```

### spin snapshot delete

```
Delete a snapshot

Usage:
  spin snapshot delete <workspace> <snapshot-id> [flags]

Flags:
  -h, --help   help for delete
  -y, --yes    Skip confirmation

Global Flags:
      --config string    config file (default is $HOME/.spin/config.yaml)
  -o, --output string    text for a person, or json: one document of what the API answered, and no prose (default "text")
      --profile string   named profile to use; SPIN_PROFILE names it when this flag does not (default "default")
```

### spin snapshot diff

```
List every file added (A), removed (D), modified (M) or changed type (T) between two of a
workspace's snapshots. --from names the earlier one; without it, the comparison starts from what
the workspace was created from.

The comparison runs in a machine of its own, so the workspace does not have to be running.

--under narrows it to one path of the filesystem. The comparison starts there rather than
filtering the whole of it, which is what keeps the change you are looking for inside the answer:
a diff is of a root filesystem, and one dependency install is tens of thousands of changes.

Usage:
  spin snapshot diff <workspace> <snapshot-id> [flags]

Flags:
      --from string    The earlier snapshot (default: what the workspace was created from)
  -h, --help           help for diff
      --under string   Compare only this path of the filesystem, from its root (default: all of it)

Global Flags:
      --config string    config file (default is $HOME/.spin/config.yaml)
  -o, --output string    text for a person, or json: one document of what the API answered, and no prose (default "text")
      --profile string   named profile to use; SPIN_PROFILE names it when this flag does not (default "default")
```

### spin snapshot list

```
List a workspace's snapshots, including those of disks it was restored away from

Usage:
  spin snapshot list <workspace> [flags]

Flags:
  -h, --help   help for list

Global Flags:
      --config string    config file (default is $HOME/.spin/config.yaml)
  -o, --output string    text for a person, or json: one document of what the API answered, and no prose (default "text")
      --profile string   named profile to use; SPIN_PROFILE names it when this flag does not (default "default")
```
