# How to create a volume snapshot

Source: https://docs.quake.ai/docs/block/how-to/create-snapshot
Markdown: https://docs.quake.ai/docs/block/how-to/create-snapshot.md

---

# How to create a volume snapshot

Create a point-in-time snapshot of a block storage volume. Snapshots are space-efficient: they store only the difference from the volume's base state, and you can use them to create new volumes or restore data.



For consistent snapshots of volumes attached to a running instance, quiesce any write activity or flush buffers before taking the snapshot.



<PrerequisiteBlock methods={["console", "cli", "api"]}>

- An existing block storage volume

</PrerequisiteBlock>

## Create the snapshot

<MethodTabs>
<Method label="Console">

<NoMoreButton />

1. Go to **Storage** > **Volumes**.
2. Find the volume you want to snapshot. On its row, open the **Volume action** icon dropdown (middle of the three per-row icons) and select **Create Snapshot**.
3. The **Create Volume Snapshot** dialog opens. The `Volume` field is read-only and shows the source volume name, type, and size. Enter a name in the required `Snapshot` field.
4. Select **OK**.

</Method>
<Method label="CLI">

```bash
openstack volume snapshot create \
  --volume my-volume \
  my-snapshot
```

Force a snapshot of an in-use volume (attached to a running instance):

```bash
openstack volume snapshot create \
  --volume my-volume \
  --force \
  my-snapshot
```



An in-use volume requires `--force`. Without it, Cinder returns HTTP 400 with `Invalid volume: ... status must be available, but current status is: in-use`. Pin `OS_VOLUME_API_VERSION=3.42` (or pass `--os-volume-api-version 3.42`) if you need a conservative guarantee that the client forwards `--force` across openstackclient versions.



</Method>
<Method label="API">

<BlockApiEnvPrereqs />

```bash
curl -X POST "$OS_VOLUME_URL/snapshots" \
  -H "X-Auth-Token: $OS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "snapshot": {
      "name": "my-snapshot",
      "volume_id": "VOLUME_ID",
      "force": false
    }
  }'
```

</Method>
</MethodTabs>

## Verify the snapshot

<MethodTabs>
<Method label="Console">

Go to **Storage** > **Volume Snapshots**. The snapshot appears with status **Available** when complete.

</Method>
<Method label="CLI">

```bash
openstack volume snapshot show my-snapshot -c status -c size -c volume_id
```

</Method>
<Method label="API">

```bash
curl -s "$OS_VOLUME_URL/snapshots/SNAPSHOT_ID" \
  -H "X-Auth-Token: $OS_TOKEN" | python3 -m json.tool
```

</Method>
</MethodTabs>

## See also

- [How to schedule volume snapshots and restore data](/docs/block/how-to/schedule-snapshots-and-restore): cron or CI-driven snapshot schedules and restore drills
- [Volumes console reference](/reference/block-storage/console/volume-snapshots)
- [Create a volume](/docs/block/how-to/create-volume)
- [Clone a volume](/docs/block/how-to/clone-volume)
