Create a snapshot of a ClickHouse instance

Create a snapshot of a ClickHouse instance. The snapshot holds the data inserted before it, except rows still in Buffer tables.

POST https://{availability_zone}.betterstackcloud.com/v1/clickhouse/{clickhouse_id}/snapshots
clickhouse_id string required

The ID of the ClickHouse instance to create a snapshot of.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

name string

The snapshot's name. Defaults to the instance's name and the date, such as analytics-2026-11-24.

metadata object

Your own tags as string pairs. Can't be changed after the snapshot is created. Accepts any keys.

202 Accepted
{
  "id": "example",
  "clickhouse_id": "123456789",
  "server_id": "123456789",
  "name": "Example ClickHouse snapshot",
  "snapshot_type": "manual",
  "status": "pending",
  "size_bytes": 1,
  "availability_zone": "example",
  "failure_reason": "example",
  "lock": {
    "reason": "fraud",
    "details": "example",
    "locked_at": "2026-07-01T12:00:00.000Z"
  },
  "created_at": "2026-07-01T12:00:00.000Z",
  "updated_at": "2026-07-01T12:00:00.000Z",
  "metadata": {
    "example": "value"
  }
}

Returns the newly created ClickHouse snapshot.

id string

The snapshot's ID, a UUID.

clickhouse_id string

The ID of the ClickHouse instance the snapshot was taken from.

server_id string or null

The ID of the server that runs the instance. The server is hidden from your list of servers. Can become null after the instance is deleted.

name string

The snapshot's name.

snapshot_type string

How the snapshot was created.
Valid values:
manual: Created by a request.
scheduled: Created by a snapshot schedule.

status string

The snapshot's state.
Valid values:
pending: We're creating the snapshot. The snapshot then becomes available, or failed with a failure_reason.
available: The snapshot is ready to restore.
failed: We couldn't create the snapshot. failure_reason says why.
deleting: We're deleting the snapshot's data. The snapshot is gone once we're done.

size_bytes integer or null

The size of the instance's disk when the snapshot was taken, in bytes. We bill by this size. Stays null until the snapshot is ready.

availability_zone string or null

The availability zone the snapshot was taken in. A restore creates the new instance in the same zone.

failure_reason string or null

Why creating the snapshot failed, or null unless the snapshot is failed.

lock object or null

Our lock on the snapshot, or null when it isn't locked. You can still delete and restore a locked snapshot.

lock.reason string

Why we locked the snapshot. Possible values: fraud, non_payment, abuse, legal, security, maintenance, other.

lock.details string or null

More about the lock, or null when there's nothing more.

lock.locked_at datetime

When we locked the snapshot. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

created_at datetime

When the snapshot was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the snapshot was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

metadata object

Your own tags as string pairs.