Restore a volume snapshot

Create a new volume from the snapshot and attach it to a server. The original volume stays as it is.

POST https://{availability_zone}.betterstackcloud.com/v1/volumes/snapshots/{id}/restore
id string required

The ID of the volume snapshot to restore.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

server_id string required

The ID of the server to attach the new volume to. We create the volume on that server's host.

name string

The new volume's name. Defaults to the snapshot's name followed by -restored- and four random characters.

auto_mount boolean default: false

Whether the server mounts the new volume's filesystem automatically when it's attached. Defaults to false.

metadata object

Your own tags for the new volume, as string pairs. Accepts any keys.

202 Accepted
{
  "id": "example",
  "name": "Example volume",
  "status": "creating",
  "volume_type": "nvme",
  "size_gb": 10,
  "server_id": "123456789",
  "format": "ext4",
  "auto_mount": false,
  "mount_path": "example",
  "device_path": "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",
  "team_id": "123456789",
  "metadata": {
    "example": "value"
  }
}

Returns the volume.

id string

The volume's ID, a UUID.

name string

The volume's name.

status string

The volume's state. While a change to the volume is in progress, other changes to it are refused.
Valid values:
creating: We're creating the volume.
attaching: We're attaching the volume to a server.
attached: The volume is attached to a server.
detaching: We're detaching the volume.
available: The volume isn't attached to a server. A new volume that ends up available couldn't be attached, and failure_reason says why.
moving: We're copying the volume to the host of the server you're attaching it to.
resizing: We're growing the volume.
snapshotting: We're creating a snapshot of the volume.
deleting: We're deleting the volume.
failed: We couldn't create the volume. A failed volume stays in this state.
destroyed: The volume is deleted.

volume_type string

The kind of storage, always nvme. Possible values: nvme.

size_gb integer

The volume's size in GiB, from 1 to 3072.

server_id string or null

The ID of the server the volume is attached to, or null when the volume isn't attached.

format string or null

The filesystem we created on the volume, or null for a volume without a filesystem. Possible values: ext4, xfs.

auto_mount boolean

Whether the server mounts the volume automatically when it's attached.

mount_path string or null

Where the server mounts the volume, under /mnt, or null when the volume isn't mounted.

device_path string or null

The volume's device path on the server, under /dev/disk/by-id. Use the device path in /etc/fstab, since it doesn't change. Stays null while the volume isn't attached.

failure_reason string or null

Why the last change to the volume failed, such as an attach, detach or resize. The reason stays after the volume is back to available or attached.

lock object or null

Our lock on the volume, or null. A locked volume can't be changed. Every change is refused with the error code locked.

lock.reason string

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

lock.details string or null

More about the lock, or null.

lock.locked_at datetime

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

created_at datetime

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

updated_at datetime

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

team_id string

The ID of the team that owns the volume. A volume belongs to the team of the server you created it on.

metadata object

Your own tags, as string keys and values, at most 10.