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

# Snapshots & volumes

> Checkpoint a running VM, fork new computers from it, and keep disk on a persistent volume across park and sleep.

State on a [computer](https://vetta.sh/docs/computer/index.md) is ephemeral by default — a [destroy](https://vetta.sh/docs/computer/sandbox.md#auto-destroy) tears it down. Snapshots and volumes are the two ways to make state outlive a single computer or session.

## Checkpoints

A **checkpoint** is a durable snapshot taken **without stopping the VM**. The computer keeps running while its disk state is captured, so you can mark a known-good baseline mid-task and return to it later.

```bash CLI theme={"system"}
vetta computer snapshot box
```

```typescript TypeScript theme={"system"}
const checkpoint = await vetta.computers.snapshot(computer.id, {
  name: "baseline",
});
```

```bash cURL theme={"system"}
curl https://api.vetta.sh/v1/computers/$COMPUTER_ID/snapshots \
  -H "Authorization: Bearer $VETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "baseline" }'
```

## Forks

A **fork** creates a **new computer from a checkpoint**. The fork is an independent computer with its own lifecycle — and it is **billed like a fresh create**: there is no creation fee, just [per-second metering](https://vetta.sh/docs/computer/limits-and-billing.md#the-compute-meter) while it runs.

```bash CLI theme={"system"}
vetta computer create --name box-2 --snapshot baseline
```

```typescript TypeScript theme={"system"}
const fork = await vetta.computers.create({
  name: "box-2",
  snapshot: checkpoint.id,
});
```

> [!TIP]
>
> Use a checkpoint + fork to explore branches from a common setup: prepare a baseline once, then fork several computers to try different approaches in parallel.

## Persistent volumes

A **persistent volume** keeps a computer's **disk** — and its **memory when paused** — alive across park and sleep. Attach one at create time and the computer's state survives the idle cycle instead of being ephemeral.

> [!WARNING]
>
> A **destroy tears everything down**, including an attached volume's contents. Volumes protect state across park/sleep — not across a destroy. Promote anything you must keep permanently to [Files](https://vetta.sh/docs/capabilities/files.md).

## Pause & resume

Pause and resume map directly onto the runtime's **wake/sleep cycle**. A paused computer keeps its disk (and, with a volume, its memory) and resumes with state intact — so **idle time costs storage only**, not compute. This is the same mechanism the [durable runtime](https://vetta.sh/docs/concepts/runtime.md#idle-costs-storage-not-compute) uses between turns.

```bash CLI theme={"system"}
vetta computer pause box     # park: storage-only
vetta computer resume box    # wake with state intact
```

| Concept | Stops the VM? | Cost while idle | Survives destroy? |
| - | - | - | - |
| **Checkpoint** | No | Snapshot storage | Yes — it's a separate artifact |
| **Fork** | N/A (new computer) | Per its own lifecycle | It is its own computer |
| **Persistent volume** | No | Storage only | No |
| **Pause / resume** | Yes (parked/sleeping) | Storage only | No |

## Fields

**volume** `string`

A persistent volume to attach. Disk survives park and sleep; memory survives a pause.

> [card] [Next: networking](https://vetta.sh/docs/computer/networking.md)
>
> Outbound access, HTTP preview URLs, and the coming egress pinning.


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