# Create and restore checkpoints

> Save a computer at a point in time and restore it into a new computer

> Nevia is in beta and open to selected teams. Public launch in Dec 2026. The CLI installs with `curl -fsSL https://get.nevia.cloud | sh`, and the MCP server is at https://api.nevia.cloud/mcp. A person signs in once in the browser.
> Setup, sign-in and requesting access: [SKILL.md](https://nevia.cloud/SKILL.md). When Nevia fits and when it doesn't: [why.md](https://nevia.cloud/why.md).

> For the complete documentation index, see [llms.txt](https://nevia.cloud/llms.txt). This page's HTML version: https://nevia.cloud/docs/computers/checkpoints

Save `demo`'s memory and disks as a checkpoint, then restore it as a new
computer, `demo-restored`. The source stays unchanged. To copy a running
computer's data disks and start from its image, [branch it](https://nevia.cloud/docs/computers/branch.md).

You need the [CLI installed and signed in](https://nevia.cloud/docs/get-started/quickstart.md), with a
[selected workspace](https://nevia.cloud/docs/workspaces/select.md) where you have the admin or editor role.
Use `demo` from
[Create a computer](https://nevia.cloud/docs/computers/create.md), and keep the name `demo-restored` free.

Creating a checkpoint requires an attached data disk and snapshot support. The
example writes to your home directory, which lives on that disk. Both depend on
the deployment's storage configuration; see
[Computer lifecycle states](https://nevia.cloud/docs/reference/computer-lifecycle.md).

## Save a checkpoint

Check `demo` before you start:

```bash
nevia status demo
```

You can checkpoint a `ready` or `sleeping` computer with no pending transition or
running operation. The file commands need `ready`, so [wake the computer](https://nevia.cloud/docs/computers/lifecycle.md)
first if it is sleeping.

Write a small scratch file:

```bash
nevia exec demo -- sh -c 'printf "saved\n" > checkpoint-note && sync'
```

Checkpoint creation closes active exec sessions, so finish any
[exec commands](https://nevia.cloud/docs/computers/exec.md) first. Checkpoints are crash consistent:
finish and flush the writes you need before capture. A running computer pauses
during capture, then resumes. A sleeping computer stays asleep.

```bash
nevia checkpoint create -c demo --name before-change --wait
nevia checkpoint ls -c demo
```

Find the `before-change` row with state `ready`. The list shows the newest
checkpoints first. Names are labels and can repeat, so status, restore and
deletion take the checkpoint's ID. Copy the full ID from the `CHECKPOINT` column
and use it in place of `01d4cnjkwhftngfp8vkmp723mhv` below:

```bash
checkpoint=01d4cnjkwhftngfp8vkmp723mhv
nevia checkpoint status "$checkpoint" -c demo
```

## Restore into a new computer

Change the source file after the checkpoint:

```bash
nevia exec demo -- sh -c 'printf "changed\n" > checkpoint-note && sync'
```

The checkpoint must be `ready`. Restore creates a new computer with the captured
memory, disks and configuration, environment included (see
[when a change reaches a computer](https://nevia.cloud/docs/reference/computer-env.md#when-a-change-reaches-a-computer)).
`demo` is untouched:

```bash
nevia restore "$checkpoint" -c demo --name demo-restored --wait
nevia status demo-restored
```

`demo-restored` should be `ready`, with no pending transition.
Compare the files:

```bash
nevia exec demo-restored -- cat checkpoint-note
nevia exec demo -- cat checkpoint-note
```

The restored computer prints `saved`. The source prints `changed`.

## Clean up

Delete the restored computer first and wait for the deletion to finish. A live
computer created from a checkpoint blocks deletion of that checkpoint and of its
source, so delete any other restores before you remove the checkpoint.
If you protected `demo-restored`, clear protection before deleting it.

These commands delete `demo-restored` and its data, then the checkpoint:

```bash
nevia rm demo-restored --yes --wait
nevia checkpoint rm "$checkpoint" -c demo --yes --wait
nevia checkpoint ls -c demo
```

The checkpoint should be gone from the list. Remove the source's scratch file:

```bash
nevia exec demo -- rm checkpoint-note
```

Deleting `demo` also deletes its remaining checkpoints, so keep it while you
need those restore points. See [Computer lifecycle states](https://nevia.cloud/docs/reference/computer-lifecycle.md)
for deletion constraints.

See [`nevia checkpoint`](https://nevia.cloud/docs/reference/cli/checkpoint.md) and
[`nevia restore`](https://nevia.cloud/docs/reference/cli/restore.md) for command options, or
[branch a computer](https://nevia.cloud/docs/computers/branch.md) from its data disks.
