---
search:
  tags:
    - database-services
    - POST
seo:
  description: >-
    Restore a database service from backups. Reference for the POST
    /api/v1/database-services/{id}/restore endpoint in the TimescaleDB
    Enterprise API.
sidebar:
  label: Restore a database service
  badge: POST
title: Restore a database service
type: openapi-operation
---
Restore a database service from backups.

`POST /api/v1/database-services/{id}/restore`

**Request body** (`application/json`)

- `allow_checksum_errors` (boolean) — Restore a backup with the Checksum errors mark (invalid page checksums) anyway. Without it, a restore or a fork that lands on such a backup is refused (422). The restore then copies every file (no delta), and pgBackRest stops at the first corrupt file
- `backup_set` (string)
- `bootstrap_bundle` (string) — The bundle file (tsdbe-bundle-v1) with the license grant for the copy, issued to the source fingerprint under this service's license; for consoles that cannot mint one
- `mode` (string)
- `repo` (integer<int64>)
- `source_repo_index` (integer<int64>)
- `source_repo_server_id` (string)
- `source_stanza_id` (string)
- `target_time` (string)

Request body example:

```json
{
  "allow_checksum_errors": true,
  "backup_set": "string",
  "bootstrap_bundle": "string",
  "mode": "string",
  "repo": 0,
  "source_repo_index": 0,
  "source_repo_server_id": "string",
  "source_stanza_id": "string",
  "target_time": "string"
}
```

**Responses**

- `202` — Accepted
- `default` — Error

Response example, 202:

```json
{
  "apply_pending": {
    "caps_stale": true,
    "guard_missing": true,
    "licensing_setup": true,
    "restart_marker": true
  },
  "backupConfigOutOfSync": true,
  "backupNeedsAttention": true,
  "backupUnprotected": true,
  "created_at": "string",
  "data_dir": "string",
  "database_name": "string",
  "extension_versions": {
    "property1": "string",
    "property2": "string"
  },
  "extensions": [
    "string"
  ],
  "health": {
    "checked_at": "2019-08-24T14:15:22Z",
    "components": [
      {
        "key": "patroni",
        "message": "string",
        "name": "string",
        "status": "healthy"
      }
    ],
    "reason": "string",
    "since": "2019-08-24T14:15:22Z",
    "status": "healthy"
  },
  "id": "string",
  "license_enforced": true,
  "license_grant_missing": true,
  "livesync_target": true,
  "name": "string",
  "pack_release": "string",
  "pg_version": "string",
  "pg_version_minor": "string",
  "postgresql_exists": true,
  "redeploy_recommended": true,
  "resolved": {
    "backup_set": "string",
    "mode": "string",
    "repo": 0
  },
  "status": "string",
  "timescaledb_version": "string",
  "topology": "single_node",
  "updates_available": true
}
```
