# Revert virtual server to snapshot

> Take a vServer back to one of its snapshots - every change since is lost.

- Effect: Destructive - Removes something for good. Agents ask first.
- Idempotent: no
- Stability: beta
- MCP tool: `manitu_vserver_snapshot_revert` on https://mcp.manitu.de/mcp
- REST: `POST https://api.manitu.de/v1/vserver/snapshot/revert`
- Needs: `service_vserver`
- Page: /reference/vserver/snapshot/revert/

**Removes something for good. Agents name what will be lost and wait for an explicit yes; a program should ask the same.**

## MCP tool

`manitu_vserver_snapshot_revert`

### Description for the model

Takes a virtual server (vServer) back to one of its snapshots, by its vserver_id and the snapshot_id from manitu_vserver_snapshot_list: everything changed on the server since that snapshot is lost, and the server is interrupted while it happens - whatever runs on it stops and open connections drop. Suggest taking a snapshot of the current state first. Ask the customer for an explicit yes first, naming the snapshot by its date and note and saying what is lost. Runs in the background: the answer is the workflow started (see pending_workflow_list of manitu_vserver_get for its progress). Refused with a conflict while another workflow runs on the vServer (blocked_by names it - wait for it, do not retry at once) or while it cannot be changed.

### Arguments

- `vserver_id` (integer | string, required) - The vserver_id from manitu_vserver_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `snapshot_id` (string, required) - The snapshot_id from manitu_vserver_snapshot_list - never guess one. (minLength `1`; maxLength `255`)

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "manitu_vserver_snapshot_revert",
    "arguments": {
      "vserver_id": 12345,
      "snapshot_id": "string"
    }
  }
}
```

## REST

`POST https://api.manitu.de/v1/vserver/snapshot/revert`

### Authentication

One of `X-API-Key`, `Authorization: Bearer …` - never more than one in a request.

### Request body

JSON; unknown fields are refused.

- `vserver_id` (integer | string, required) - The vserver_id from manitu_vserver_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `snapshot_id` (string, required) - The snapshot_id from manitu_vserver_snapshot_list - never guess one. (minLength `1`; maxLength `255`)

### Response

In `data`; the rest of the body as on every call.

- `workflow` (string, required) - What is being done, e.g. a reboot. (one of `"create"`, `"destroy"`, `"power_start"`, `"power_stop"`, `"power_reboot"`, `"reinstall"`, `"ptr_set"`, `"vnc_enable"`, `"vnc_disable"`, `"rescuesystem_enable"`, `"rescuesystem_disable"`, `"snapshot_create"`, `"snapshot_delete"`, `"snapshot_delete_all"`, `"snapshot_revert"`, `"telemetry_await"`, `"iso_eject"`)
- `workflow_id` (string, required) - The id of this run of the workflow.
- `created_at` (string | null, required) - When it was asked for. (format `date-time`)
- `started_at` (string | null, required) - When it started; null while it waits for the next run - usually a minute or two, at times longer. Nothing to tell the customer unless asked. (format `date-time`)
- `workflow_token` (string | null, required) - Pass it to manitu_workflow_get to see how far the workflow is - as it is, never built or changed. A secret of this workflow: do not show it to anyone. null if there is none.
- `task` (object, required) - The task the customer panel polls for its progress.
  - `task.id` (integer, required)
  - `task.auth` (string, required)

### Statuses

- `200` Success.
- `400` The request does not match the declared input schema.
- `401` No credential was presented, or it was not recognised.
- `403` The credential is not permitted to use this operation.
- `500` The server failed. Nothing about the request was wrong. Whether a change took effect is not known - check before trying it again.
- `503` The channel this operation forwards through is unavailable.

### Example

```sh
curl -X POST 'https://api.manitu.de/v1/vserver/snapshot/revert' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"vserver_id":12345,"snapshot_id":"string"}'
```

## Example result

```json
{
  "workflow": "create",
  "workflow_id": "string",
  "created_at": "2026-10-23T12:00:00+02:00",
  "started_at": "2026-10-23T12:00:00+02:00",
  "workflow_token": "eyJwYWdlIjoyfQ",
  "task": {
    "id": 1,
    "auth": "string"
  }
}
```
