> ## 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](/docs/computer/index) is ephemeral by default — a [destroy](/docs/computer/sandbox#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.

<CodeGroup>
  ```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" }'
  ```
</CodeGroup>

## 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](/docs/computer/limits-and-billing#the-compute-meter) while it runs.

<CodeGroup>
  ```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,
  });
  ```
</CodeGroup>

<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.
</Tip>

## 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](/docs/capabilities/files).
</Warning>

## 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](/docs/concepts/runtime#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

<ParamField path="volume" type="string">
  A persistent volume to attach. Disk survives park and sleep; memory survives a pause.
</ParamField>

<Card title="Next: networking" icon="network-wired" href="/docs/computer/networking">
  Outbound access, HTTP preview URLs, and the coming egress pinning.
</Card>
