# snapshot-restore

Restore a flexi image snapshot to a VM or storage instance. This command allows you to revert a VM or storage instance to the state captured in a flexi image snapshot.

## Usage

```
cldkctl flexi-image snapshot-restore [flags]
```

## Aliases

```
snapshot-restore, snapshot-restore
```

## Steps

Follow the steps below to run and view the result of this command:

1. Refer to the [**Image List**](/guidance-for-individual/cloudeka-api-list/command-reference/cldkctl-flexi/image/list.md) section to obtain the **image ID**.
2. Refer to the [**Image Detail**](/guidance-for-individual/cloudeka-api-list/command-reference/cldkctl-flexi/image/detail.md) section to obtain the **instance ID**.
3. Run the following command in your terminal:

```
cldkctl flexi-image snapshot-restore --image [image-id] --instance [instance-id] 
```

4. Replace **\[image-id]** with the image ID and **\[instance-id]** with the instance ID.
5. When prompted, type **y** to confirm the snapshot restore.
6. Once completed successfully, the terminal displays the success message.

<figure><img src="/files/AmsTY0GGOzyOZvp73PXR" alt=""><figcaption></figcaption></figure>

## Flags

{% hint style="info" %}
This command supports [global flags](/guidance-for-individual/cloudeka-api-list/global-flags.md). Refer to the Global Flags section for details
{% endhint %}

<table><thead><tr><th width="223.77777099609375">Flag</th><th>Description</th></tr></thead><tbody><tr><td>-h, --help<br>--image string<br>--instance string</td><td>Help for the snapshot-restore command.<br>Image ID of the snapshot to restore.<br>Instance ID of the VM or storage to restore.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudeka.ai/guidance-for-individual/cloudeka-api-list/command-reference/cldkctl-flexi/image/snapshot-restore.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
