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

# Undo a change with stack history

> Read the recorded versions of each add-on and manifest in a Stack, compare two of them, and restore an earlier version to the cluster.

Every time a deployed add-on or manifest in a [Stack](https://docs.ankra.ai/concepts/stacks.md) changes, Ankra records its definition as a new version. When a change goes wrong, you can read those versions per resource, compare one with another, and restore the one that worked. A restore puts the recorded definition back and deploys it; it does not bring back data.

It takes a few minutes per resource.

## Before you start

* **The Stack is deployed.** Versions appear after the platform records changes to deployed add-ons or manifests; a Stack that exists only as a draft has none.
* **To restore, a role with `clusters.operate` on the cluster.** Anyone who can open the Stack can read its history; without that permission the page says "Your role needs clusters.operate to restore a version."
* **Know what a restore does not do.** It does not restore database or volume data. To get data back, restore a [restore point](https://docs.ankra.ai/guides/backups.md).

## Restore an earlier version

**1. Open the Stack's history**

Open **Infrastructure → Clusters → \<your cluster> → Stacks** (under **Technical details**), open the Stack, and select **More → History and rollback** (`/next/clusters/<cluster-id>/stacks/<stack>/history`).

The page reads **Review changes and restore a version**. If it says **No resource versions recorded**, nothing deployed in this Stack has changed yet.

**2. Pick the resource**

Under **Resource history**, choose the add-on or manifest in **Resource**.

The table lists its recorded versions, newest first, with **Date**, **Changed by**, **Part** (which part of the resource the version records) and **Review**. The page reads up to 100 recorded versions; that is how many it shows, not how many Ankra keeps. Protected values are hidden.

**3. Review a version and compare it**

Select **Review version** on the version you want back. **Review** and the resource's name opens below, with the **Selected version** beside the **Comparison version**: the next older version of the same part, picked for you.

Change **Compare with** to compare against any other recorded version, or **No comparison** to read the selected one on its own.

**4. Restore it**

Select **Review restore**. The dialog **Restore** and the resource's name says what happens: the recorded version replaces the resource's current definition and dependencies, configuration and metadata in that version are restored together, and deployment starts. Type the resource's name to confirm, then select **Restore version**.

The page shows **Restore accepted**: "The platform recorded the restore."

**5. Follow the deployment**

Select **Follow deployment operations** to open the cluster's **Operations**, and check the resource before you rely on it.

> [!WARNING]
>
> A restore deploys straight away and does not restore persistent data. If the Stack has an open draft, review that draft again after the restore: it was based on the definition the restore replaced.

## Read the history from the CLI or MCP

```bash theme={null}
ankra cluster select my-cluster
ankra cluster stacks history my-stack
```

`-o json` prints it for scripts. Restoring a recorded version is a portal action. From an AI client connected to Ankra's MCP server, `get_stack_history` reads who changed what and when, per resource, and `rollback_addon` rolls an add-on back to a previous deployment version ([MCP tools](https://docs.ankra.ai/platform/mcp-tools.md)).

## Verify

On the cluster's **Operations**, the deployment the restore started has finished. Open the Stack again: the resource shows the restored definition. From the CLI, `ankra cluster stacks history my-stack` shows the resource's latest changes.

## What can go wrong

| What you see | What to do |
| - | - |
| "Your role needs clusters.operate to restore a version." | Ask someone with that permission on the cluster to restore it. |
| **No resource versions recorded** | Nothing deployed in the Stack has changed yet, or the Stack is still a draft. |
| "This version has no displayable definition." | Ankra recorded the version but cannot show it. Compare other versions, or pick another to restore. |
| "The restore was not confirmed. Close this review and refresh the history before trying again." | Close the dialog, refresh the page and check the history before restoring again. |
| The data is still wrong after the restore | A restore brings back definitions, not data. Restore a [restore point](https://docs.ankra.ai/guides/backups.md). |

## Next steps

* [Create and change a stack](https://docs.ankra.ai/guides/create-and-change-a-stack.md) - the draft, review and deploy loop for forward fixes.
* [Backups and restore points](https://docs.ankra.ai/guides/backups.md) - get a Stack's data back.
* [Operations](https://docs.ankra.ai/platform/operations.md) - follow what a deployment did.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.