---
title: "Back a volume up now, off its host."
method: POST
path: "/v1/volumes/{id}:backup"
tags: ["volumes"]
---

# Back a volume up now, off its host.

`POST /v1/volumes/{id}:backup`

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/volumes/{id}:backup`
- Auth: HTTP bearer

The backup is a crash-consistent point in time, taken while sandboxes may be writing. It is ready once copied off the host and checked; send Prefer: wait=60 to wait for it. A volume lives on one host's disks. It is backed up off that host daily unless you turn that off, and whenever you ask; backedUp is true once a backup has been copied off the host and checked. Writes since the last backup are not in it. A backup is crash-consistent: what a program had not yet written to the disk is not in it.

## Path parameters

- `id` string, required: Resource identifier (UUID).

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `name` string: Your own handle for the resource. Letters, digits, dot, dash, underscore.
  - `labels` object: Your own key/value tags, at most 32. Filter lists with label=key:value.
  - `retentionDays` integer: Days to keep it, 1 to 365; the volume's backup retention (7 unless set) when omitted.

## Response `200`

Success

- object
  - `id` string, required
  - `kind` 'volume-backup', required
  - `status` string, required
  - `state` 'pending' | 'ready' | 'failed' | 'deleting' | 'deleted', required
  - `name` string, nullable
  - `volumeId` string, required
  - `sizeMiB` integer, required: The volume's size when backed up; a restore is this size.
  - `trigger` 'manual' | 'daily'
  - `retentionDays` integer
  - `storedBytes` integer, nullable: What it keeps off the host, compressed and encrypted.
  - `error` string, nullable
  - `errorCode` string, nullable: Why it failed, when a code says it: backup_stalled when its copy off the host never began. Back it up again.
  - `createdAt` string
  - `copyStartedAt` string, nullable: When its copy off the volume's server began; null while it waits its turn behind other copies there.
  - `readyAt` string, nullable
  - `expiresAt` string, required

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
