> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing disk snapshots in Compute

A *disk snapshot* captures a point-in-time copy of a disk. This is an instant disk backup that allows you to:

* Clone and recover a certain state of the disk.
* Eliminate data loss risks.
* Prevent accidental deletion, corruption and security incidents.
* Make a copy of a disk before risky operations, such as software upgrades, patches or configuration changes, so you can roll back in case of issues.
* Fulfill compliance requirements for immutable system versions, if applicable.

To clone a disk state, [create a snapshot](#how-to-create-a-snapshot). To restore a disk state, [create a new disk from a snapshot](#how-to-create-a-disk-from-a-snapshot).

Snapshots support both boot and additional disks. They also support all [disk types](/compute/storage/types#disk-types): SSD, SSD Non-replicated and SSD IO M3.

Every snapshot is only available in the project where it was created. Therefore, you can only work with snapshots and disks within the project.

Nebius AI Cloud charges for a complete copy of a disk and applies separate pricing for snapshots. For more information, see [Compute pricing](/compute/resources/pricing#disk-snapshots).

## Prerequisites

<Tabs group="interfaces">
  <Tab title="Web console">
    Make sure you are in a [group](/iam/authorization/groups/index) that has at least the `editor` role within your tenant or project; for example, the default `editors` group. You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.
  </Tab>

  <Tab title="CLI">
    * [Install and configure](/cli/install) the Nebius AI Cloud CLI.

    * Make sure you are in a [group](/iam/authorization/groups/index) that has at least the `editor` role within your tenant or project; for example, the default `editors` group. You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.
  </Tab>

  <Tab title="Go SDK">
    * [Install and initialize the Nebius SDK for Go](/grpc-api/sdk/go).

    * Make sure you are in a [group](/iam/authorization/groups/index) that has at least the `editor` role within your tenant or project; for example, the default `editors` group. You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.
  </Tab>

  <Tab title="Python SDK">
    * [Install and initialize the Nebius SDK for Python](/grpc-api/sdk/python).

    * Make sure you are in a [group](/iam/authorization/groups/index) that has at least the `editor` role within your tenant or project; for example, the default `editors` group. You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.
  </Tab>

  <Tab title="JavaScript SDK">
    * [Install and initialize the Nebius SDK for JavaScript](/grpc-api/sdk/javascript).

    * Make sure you are in a [group](/iam/authorization/groups/index) that has at least the `editor` role within your tenant or project; for example, the default `editors` group. You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.
  </Tab>
</Tabs>

## How to create a snapshot

To create a snapshot, you don't need to stop a virtual machine.

<Tabs group="interfaces">
  <Tab title="Web console">
    1. In the sidebar, go to <Icon icon="https://mintcdn.com/nebius-ai-cloud/rOlLZ_MFvrheaI-h/_assets/sidebar/storage.svg?fit=max&auto=format&n=rOlLZ_MFvrheaI-h&q=85&s=f060b15cbd82c08f84599faeeeb07ece" width="16" height="16" data-path="_assets/sidebar/storage.svg" /> **Storage** → **Disks**.

    2. In the list of disks, find the disk that you want to create a snapshot for.

    3. In the line of the required disk, click <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad" width="12" height="24" data-path="_assets/button-vellipsis.svg" /> → **Create snapshot**.

    4. In the window that opens, specify the name and optionally the description of the snapshot.

       The ID of the selected disk is prefilled in the **Source disk** field.

    5. Click **Create snapshot**.

    Once you create a snapshot, it appears on the disk page. There, you can find all snapshots created for a given disk.
  </Tab>

  <Tab title="CLI">
    Run the following command:

    ```bash theme={null}
    nebius compute disk-snapshot create \
       --name <snapshot_name> \
       --description "<snapshot_description>" \
       --source-disk-id <disk_ID>
    ```

    The command contains the following parameters:

    * `--name`: Snapshot name.
    * `--description` (optional): Snapshot description.
    * `--source-disk-id`: ID of the disk that you want to create a snapshot for. To get the disk ID, run `nebius compute disk list`.
  </Tab>

  <Tab title="Go SDK">
    ```go theme={null}
    snapshotOperation, err := sdk.Services().Compute().V1().
        DiskSnapshot().Create(
            ctx,
            &compute.CreateDiskSnapshotRequest{
                Metadata: &common.ResourceMetadata{
                    Name: "<snapshot_name>",
                },
                Spec: &compute.DiskSnapshotSpec{
                    SourceDiskId: "<disk_ID>",
                    Description:  "<snapshot_description>",
                },
            },
        )
    if err != nil {
        return err
    }
    if _, err = snapshotOperation.Wait(ctx); err != nil {
        return err
    }
    ```

    The code contains the following parameters:

    * `Metadata.Name`: Snapshot name.
    * `Spec.SourceDiskId`: ID of the disk that you want to create a snapshot for.
    * `Spec.Description` (optional): Snapshot description.
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    snapshot_service = DiskSnapshotServiceClient(sdk)
    create_snapshot_operation = await snapshot_service.create(
        CreateDiskSnapshotRequest(
            metadata=ResourceMetadata(
                name="<snapshot_name>",
            ),
            spec=DiskSnapshotSpec(
                source_disk_id="<disk_ID>",
                description="<snapshot_description>",
            ),
        ),
    )
    await create_snapshot_operation.wait()
    ```

    The code contains the following parameters:

    * `metadata.name`: Snapshot name.
    * `spec.source_disk_id`: ID of the disk that you want to create a snapshot for.
    * `spec.description` (optional): Snapshot description.
  </Tab>

  <Tab title="JavaScript SDK">
    ```ts theme={null}
    const snapshotService = new DiskSnapshotService(sdk);
    const createSnapshotOperation = await snapshotService.create(
      CreateDiskSnapshotRequest.create({
        metadata: ResourceMetadata.create({
          name: "<snapshot_name>",
        }),
        spec: DiskSnapshotSpec.create({
          sourceDiskId: "<disk_ID>",
          description: "<snapshot_description>",
        }),
      }),
    ).result;
    await createSnapshotOperation.wait();
    ```

    The code contains the following parameters:

    * `metadata.name`: Snapshot name.
    * `spec.sourceDiskId`: ID of the disk that you want to create a snapshot for.
    * `spec.description` (optional): Snapshot description.
  </Tab>
</Tabs>

## How to create a disk from a snapshot

After you [prepare a snapshot](#how-to-create-a-snapshot), you can create a disk based on this snapshot. Thus, you restore the needed disk state with data integrity verified.

To create a disk from a snapshot:

<Tabs group="interfaces">
  <Tab title="Web console">
    1. In the sidebar, go to <Icon icon="https://mintcdn.com/nebius-ai-cloud/rOlLZ_MFvrheaI-h/_assets/sidebar/storage.svg?fit=max&auto=format&n=rOlLZ_MFvrheaI-h&q=85&s=f060b15cbd82c08f84599faeeeb07ece" width="16" height="16" data-path="_assets/sidebar/storage.svg" /> **Storage** → **Disks** → **Snapshots**.

    2. In the line of the required snapshot, click <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad" width="12" height="24" data-path="_assets/button-vellipsis.svg" /> → **Create disk**.

    3. On the disk creation page that opens, check the **Disk source type** and **Snapshot** fields. They are prefilled:

       * **Disk source type**: Snapshot.
       * **Snapshot**: ID of the selected snapshot.

    4. Set other needed [fields for the disk](/compute/storage/manage#how-to-create-a-disk) and click **Create disk**.
  </Tab>

  <Tab title="CLI">
    Run the following command:

    ```bash theme={null}
    nebius compute disk create \
       --name <disk_name> \
       --type network_<ssd|ssd_non_replicated|ssd_io_m3> \
       --size-gibibytes <size> \
       --block-size-bytes <block_size> \
       --source-snapshot-id <snapshot_ID>
    ```

    To get the snapshot ID, run `nebius compute disk-snapshot list`.
  </Tab>

  <Tab title="Go SDK">
    ```go theme={null}
    // One of compute.DiskSpec_NETWORK_SSD,
    // compute.DiskSpec_NETWORK_SSD_NON_REPLICATED,
    // or compute.DiskSpec_NETWORK_SSD_IO_M3.
    diskType := compute.DiskSpec_NETWORK_SSD
    diskOperation, err := sdk.Services().Compute().V1().
        Disk().Create(
            ctx,
            &compute.CreateDiskRequest{
                Metadata: &common.ResourceMetadata{
                    Name: "<disk_name>",
                },
                Spec: &compute.DiskSpec{
                    Size: &compute.DiskSpec_SizeGibibytes{
                        SizeGibibytes: <size>,
                    },
                    BlockSizeBytes: <block_size>,
                    Type:           diskType,
                    Source: &compute.DiskSpec_SourceSnapshotId{
                        SourceSnapshotId: "<snapshot_ID>",
                    },
                },
            },
        )
    if err != nil {
        return err
    }
    if _, err = diskOperation.Wait(ctx); err != nil {
        return err
    }
    ```

    The code contains the following parameters:

    * `diskType`: [Disk type](/compute/storage/types#network-ssd-disks).
    * `Metadata.Name`: Disk name.
    * `Spec.Size.SizeGibibytes`: Disk size in gibibytes.
    * `Spec.BlockSizeBytes`: Block size in bytes.
    * `Spec.Type`: Disk type set by `diskType`.
    * `Spec.Source.SourceSnapshotId`: ID of the snapshot to create the disk from.
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    # One of DiskSpec.DiskType.NETWORK_SSD,
    # DiskSpec.DiskType.NETWORK_SSD_NON_REPLICATED,
    # or DiskSpec.DiskType.NETWORK_SSD_IO_M3.
    disk_type = DiskSpec.DiskType.NETWORK_SSD

    disk_service = DiskServiceClient(sdk)
    create_disk_operation = await disk_service.create(
        CreateDiskRequest(
            metadata=ResourceMetadata(
                name="<disk_name>",
            ),
            spec=DiskSpec(
                block_size_bytes=<block_size>,
                type=disk_type,
                source_snapshot_id="<snapshot_ID>",
                size_gibibytes=<size>,
            ),
        ),
    )
    await create_disk_operation.wait()
    ```

    The code contains the following parameters:

    * `disk_type`: [Disk type](/compute/storage/types#network-ssd-disks).
    * `metadata.name`: Disk name.
    * `spec.block_size_bytes`: Block size in bytes.
    * `spec.type`: Disk type set by `disk_type`.
    * `spec.source_snapshot_id`: ID of the snapshot to create the disk from.
    * `spec.size_gibibytes`: Disk size in gibibytes.
  </Tab>

  <Tab title="JavaScript SDK">
    ```ts theme={null}
    // One of DiskSpec_DiskType.NETWORK_SSD,
    // DiskSpec_DiskType.NETWORK_SSD_NON_REPLICATED,
    // or DiskSpec_DiskType.NETWORK_SSD_IO_M3.
    const diskType = DiskSpec_DiskType.NETWORK_SSD;

    const diskService = new DiskService(sdk);
    const createDiskOperation = await diskService.create(
      CreateDiskRequest.create({
        metadata: ResourceMetadata.create({
          name: "<disk_name>",
        }),
        spec: DiskSpec.create({
          blockSizeBytes: <block_size>,
          type: diskType,
          source: {
            $case: "sourceSnapshotId",
            sourceSnapshotId: "<snapshot_ID>",
          },
          size: {
            $case: "sizeGibibytes",
            sizeGibibytes: <size>,
          },
        }),
      }),
    ).result;
    await createDiskOperation.wait();
    ```

    The code contains the following parameters:

    * `diskType`: [Disk type](/compute/storage/types#network-ssd-disks).
    * `metadata.name`: Disk name.
    * `spec.blockSizeBytes`: Block size in bytes.
    * `spec.type`: Disk type set by `diskType`.
    * `spec.source.sourceSnapshotId`: ID of the snapshot to create the disk from.
    * `spec.size.sizeGibibytes`: Disk size in gibibytes.
  </Tab>
</Tabs>

After you create the disk, you can [create a virtual machine](/compute/virtual-machines/manage#create-a-vm) with it.

## How to update a snapshot

In the web console, you can only change the snapshot name. In the CLI, you can change the snapshot name and description.

<Tabs group="interfaces">
  <Tab title="Web console">
    1. In the sidebar, go to <Icon icon="https://mintcdn.com/nebius-ai-cloud/rOlLZ_MFvrheaI-h/_assets/sidebar/storage.svg?fit=max&auto=format&n=rOlLZ_MFvrheaI-h&q=85&s=f060b15cbd82c08f84599faeeeb07ece" width="16" height="16" data-path="_assets/sidebar/storage.svg" /> **Storage** → **Disks** → **Snapshots**.
    2. In the line of the required snapshot, click <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad" width="12" height="24" data-path="_assets/button-vellipsis.svg" /> → **Settings**.
    3. On the page of the snapshot settings that opens, update the snapshot name and click **Save changes**.
  </Tab>

  <Tab title="CLI">
    Run the following command:

    ```bash theme={null}
    nebius compute disk-snapshot update \
       --id <snapshot_ID> \
       --name <new_snapshot_name> \
       --description "<new_snapshot_description>"
    ```

    In the command, specify the ID of the snapshot that you want to update. To get the snapshot ID, run `nebius compute disk-snapshot list`.
  </Tab>

  <Tab title="Go SDK">
    ```go theme={null}
    snapshotForUpdate, err := sdk.Services().Compute().V1().
        DiskSnapshot().Get(
            ctx,
            &compute.GetDiskSnapshotRequest{
                Id: "<snapshot_ID>",
            },
        )
    if err != nil {
        return err
    }
    if snapshotForUpdate.GetMetadata() == nil ||
        snapshotForUpdate.GetSpec() == nil {
        return errors.New("snapshot metadata or spec is missing")
    }
    snapshotForUpdate.Metadata.Name = "<new_snapshot_name>"
    snapshotForUpdate.Spec.Description = "<new_snapshot_description>"
    snapshotOperation, err = sdk.Services().Compute().V1().
        DiskSnapshot().Update(
            ctx,
            &compute.UpdateDiskSnapshotRequest{
                Metadata: snapshotForUpdate.Metadata,
                Spec:     snapshotForUpdate.Spec,
            },
        )
    if err != nil {
        return err
    }
    if _, err = snapshotOperation.Wait(ctx); err != nil {
        return err
    }
    ```

    The code contains the following parameters:

    * `GetDiskSnapshotRequest.Id`: ID of the snapshot that you want to update.
    * `Metadata.Name`: New snapshot name.
    * `Spec.Description`: New snapshot description.
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    snapshot_service = DiskSnapshotServiceClient(sdk)
    snapshot = await snapshot_service.get(
        GetDiskSnapshotRequest(id="<snapshot_ID>"),
    )
    if snapshot.metadata is None or snapshot.spec is None:
        raise ValueError("snapshot metadata or spec is missing")
    snapshot.metadata.name = "<new_snapshot_name>"
    snapshot.spec.description = "<new_snapshot_description>"
    update_snapshot_operation = await snapshot_service.update(
        UpdateDiskSnapshotRequest(
            metadata=snapshot.metadata,
            spec=snapshot.spec,
        ),
    )
    await update_snapshot_operation.wait()
    ```

    The code contains the following parameters:

    * `GetDiskSnapshotRequest.id`: ID of the snapshot that you want to update.
    * `metadata.name`: New snapshot name.
    * `spec.description`: New snapshot description.
  </Tab>

  <Tab title="JavaScript SDK">
    ```ts theme={null}
    const updateSnapshotService = new DiskSnapshotService(sdk);
    const snapshotForUpdate = await updateSnapshotService.get(
      GetDiskSnapshotRequest.create({
        id: "<snapshot_ID>",
      }),
    );
    if (!snapshotForUpdate.metadata || !snapshotForUpdate.spec) {
      throw new Error("snapshot metadata or spec is missing");
    }
    snapshotForUpdate.metadata.name = "<new_snapshot_name>";
    snapshotForUpdate.spec.description = "<new_snapshot_description>";
    const updateSnapshotOperation = await updateSnapshotService.update(
      UpdateDiskSnapshotRequest.create({
        metadata: snapshotForUpdate.metadata,
        spec: snapshotForUpdate.spec,
      }),
    ).result;
    await updateSnapshotOperation.wait();
    ```

    The code contains the following parameters:

    * `GetDiskSnapshotRequest.id`: ID of the snapshot that you want to update.
    * `metadata.name`: New snapshot name.
    * `spec.description`: New snapshot description.
  </Tab>
</Tabs>

## How to delete a snapshot

<Tabs group="interfaces">
  <Tab title="Web console">
    1. In the sidebar, go to <Icon icon="https://mintcdn.com/nebius-ai-cloud/rOlLZ_MFvrheaI-h/_assets/sidebar/storage.svg?fit=max&auto=format&n=rOlLZ_MFvrheaI-h&q=85&s=f060b15cbd82c08f84599faeeeb07ece" width="16" height="16" data-path="_assets/sidebar/storage.svg" /> **Storage** → **Disks** → **Snapshots**.
    2. In the line of the required snapshot, click <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad" width="12" height="24" data-path="_assets/button-vellipsis.svg" /> → **Delete**.
    3. In the window that opens, confirm the deletion.
  </Tab>

  <Tab title="CLI">
    Run the following command:

    ```bash theme={null}
    nebius compute disk-snapshot delete <snapshot_ID>
    ```

    To get the snapshot ID, run `nebius compute disk-snapshot list`.
  </Tab>

  <Tab title="Go SDK">
    ```go theme={null}
    snapshotOperation, err = sdk.Services().Compute().V1().
        DiskSnapshot().Delete(
            ctx,
            &compute.DeleteDiskSnapshotRequest{
                Id: "<snapshot_ID>",
            },
        )
    if err != nil {
        return err
    }
    if _, err = snapshotOperation.Wait(ctx); err != nil {
        return err
    }
    ```

    In `DeleteDiskSnapshotRequest.Id`, specify the ID of the snapshot that you want to delete.
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    snapshot_service = DiskSnapshotServiceClient(sdk)
    delete_snapshot_operation = await snapshot_service.delete(
        DeleteDiskSnapshotRequest(id="<snapshot_ID>"),
    )
    await delete_snapshot_operation.wait()
    ```

    In `DeleteDiskSnapshotRequest.id`, specify the ID of the snapshot that you want to delete.
  </Tab>

  <Tab title="JavaScript SDK">
    ```ts theme={null}
    const deleteSnapshotService = new DiskSnapshotService(sdk);
    const deleteSnapshotOperation = await deleteSnapshotService.delete(
      DeleteDiskSnapshotRequest.create({
        id: "<snapshot_ID>",
      }),
    ).result;
    await deleteSnapshotOperation.wait();
    ```

    In `DeleteDiskSnapshotRequest.id`, specify the ID of the snapshot that you want to delete.
  </Tab>
</Tabs>
