---
title: "Restore a database"
method: POST
path: "/projects/{id}/databases/{databaseName}/restores"
tags: ["Database Backups"]
---

# Restore a database

`POST /projects/{id}/databases/{databaseName}/restores`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/databases/{databaseName}/restores`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Replaces the database's data, either with a named backup or with its
state at a point in time. This is destructive: everything written after
that point is discarded.

Asynchronous: the response is `202` with the restore `pending` and the
database `restoring`. The database does not accept connections until the
restore reports `completed`; its connection string is unchanged
throughout, so nothing holding it needs updating.

Restores are in place. There is no way to restore into a second
database, and a database's branches are never restored — they keep
serving their own data, but resetting a branch from its parent is
refused by the storage provider for up to 24 hours afterwards.

## Path parameters

- `id` string, uuid, required
- `databaseName` string, required

## Request body

- CreateDatabaseRestoreRequest: Names what to restore. Supply exactly one of `backup_name` or `restore_to`.
  - `backup_name` string: A backup of this database to restore, exactly as returned by the list endpoint. Deliberately looser than the names you can create, like the backup path parameter: a backup made by a schedule is named for you, so restoring one accepts any name a backup can have.
  - `restore_to` string, date-time: A point in time to restore to, which must fall inside the `restore_window` reported when listing backups.

## Response `202`

Restore accepted and in progress

- DatabaseRestore: A restore of a database, either from a named backup or to a point in time. Restores run in the background and take longer than a request, so the database is unavailable until this reports `completed`.
  - `id` string, uuid, required
  - `database_id` string, uuid, required
  - `project_id` string, uuid, required
  - `kind` 'snapshot' | 'point_in_time', required: Whether the restore targets a named backup or an arbitrary point in time. Both replace the database's data in place.
  - `status` 'pending' | 'running' | 'completed' | 'failed' | 'exhausted', required: Restore status. `pending` and `running` both mean the restore is still in flight and the database is not connectable; an attempt that fails with tries left goes back to `pending`. `failed` and `exhausted` both mean Volcano gave up: the database is left `failed` if its data may already have been replaced, and `active` if the restore never started — a backup that no longer exists at the provider ends the restore without touching the database. A restore cannot be cancelled once it starts.
  - `backup_name` string: The backup restored, kept even if that backup is later deleted. Absent for a point-in-time restore.
  - `restore_to` string, date-time: The point in time restored to. Absent for a backup restore.
  - `error` string: Why the most recent attempt failed, when one has.
  - `completed_at` string, date-time
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Neither or both restore targets were named, or the requested time is outside the available window.
- `403`: The owner's plan does not include backups or point-in-time restore (code `plan_required`). Both are available only on SUPERAGENT. Also answers 403 without a code, with `restore history is not available yet for the requested time`, when the plan includes restore history but the database has not built any up yet; waiting fixes it, not upgrading.
- `404`: Project, database, or backup not found
- `409`: A restore is already in progress, the database is not active, another database operation is still running, or the database is holding as many pre-restore branches as it may.
- `503`: Backups are temporarily unavailable

## Changes

- **2026-10-07** `23e7875e7c4c`: 1 info
  - the endpoint scheme security `ProjectAccessToken` was added to the API
- **2026-09-19** `3a6f365f3f35`: 9 breaking, 23 info
  - added the new path request parameter `databaseName`
  - added the new path request parameter `id`
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `202`
  - …28 more
- **2026-09-04** `c2ec82fb8ce8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/databases/:databaseName/restores/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
