> For the complete documentation index, see [llms.txt](https://docs.cloudeka.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudeka.ai/guidance-for-enterprise/cloudeka-api-list/command-reference/cldkctl-flexi/image/snapshot-restore.md).

# 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-enterprise/cloudeka-api-list/command-reference/cldkctl-flexi/image/list.md) section to obtain the **image ID**.
2. Refer to the [**Image Detail**](/guidance-for-enterprise/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-enterprise/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>
