---
title: "Restore to a new database"
method: POST
path: "/api/v1/databases/{database_id}/restore"
tags: ["Managed Databases"]
---

# Restore to a new database

`POST /api/v1/databases/{database_id}/restore`

Restore a database into a NEW instance. In-place restore is not supported — it would destroy the backup timeline it restores from — so `clone_to_new` must be `true`.

Choose the restore point with `backup_id` (a specific completed backup) or, for PostgreSQL, `pitr_timestamp` (any point in time covered by continuous WAL archiving). Omit both to restore the latest available state.

The clone inherits the source's plan, storage, VPC, and project, starts with no read replicas, and bills pay-as-you-go. High availability is an explicit choice via `ha_enabled` — never inherited. If `new_name` is taken, the platform auto-suffixes it (`-2`, `-3`, …).

The clone provisions asynchronously; poll `GET /api/v1/databases/{new_database_id}` like any create.

## Path parameters

- `database_id` string, required

## Request body

- RestoreDatabaseRequest
  - `clone_to_new` boolean, required — Must be `true` — restores always create a new database; in-place restore is not supported
  - `backup_id` string, uuid — Restore from this completed backup. Omit to use `pitr_timestamp` or the latest state.
  - `pitr_timestamp` string, date-time — Point-in-time restore target (RFC 3339). PostgreSQL only — Valkey restores from snapshots via `backup_id`.
  - `new_name` string — Name for the new database. Defaults to `{source-name}-restored`; auto-suffixed (`-2`, `-3`, …) if taken.
  - `ha_enabled` boolean — Enable high availability on the new database (+70% of the plan price). Never inherited from the source.

## Response `200`

Restore started

- object
  - `success` boolean
  - `new_database_id` string — Short ID of the new database being created

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required
- `404` — Resource not found

---

[API](https://skmtc.dev/rafftechnologies/apis/raff-api.md) · [All operations](https://skmtc.dev/rafftechnologies/apis/raff-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rafftechnologies/raff-api/revisions/2f4df56be77c/schema)
