---
title: "Restore a backup for given site (via background task)"
method: POST
path: "/v1/sites/{id}/backup/{backup_id}/restore"
tags: ["Backups"]
---

# Restore a backup for given site (via background task)

`POST /v1/sites/{id}/backup/{backup_id}/restore`

For a given backup_id restore site with given site id.

## Path parameters

- `id` integer, required — ID of the Site you are interacting with
- `backup_id` integer, required

## Request body

- RestoreBackupRequest
  - `backup_directory` boolean — Whether to restore the files from the backup
  - `backup_database` boolean — Whether to restore the database from the backup

## Response `200`

OK

- TaskIDResponse — Information about the task that was created as a result of this API call
  - `success` boolean — whether the request succeeded
  - `errors` string[]
  - `messages` string[], nullable
  - `result` object
    - `task_id` string — Task ID of the task that is now running
    - `task_level` 'account' | 'site' — Level at which the task exists

## Other responses

- `400` — Bad Request
- `401` — Authentication failed
- `403` — Not authorized to access endpoint
- `404` — Given site not found for user
- `405` — Invalid input
- `500` — Internal error

---

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