---
title: "Restore an environment snapshot"
method: POST
path: "/projects/{projectId}/environments/{environmentId}/backups/{backupId}/restore"
tags: ["Environment Backups"]
---

# Restore an environment snapshot

`POST /projects/{projectId}/environments/{environmentId}/backups/{backupId}/restore`

Restore a specific backup from an environment using the `id`
of the entry retrieved by the
[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)
endpoint.

## Path parameters

- `projectId` string, required
- `environmentId` string, required
- `backupId` string, required

## Request body

- EnvironmentRestoreInput
  - `environment_name` string, nullable, required
  - `branch_from` string, nullable, required
  - `restore_code` boolean, required — Whether we should restore the code or only the data
  - `restore_resources` boolean, required — Whether we should restore resources configuration from the backup
  - `resources` object, nullable, required
    - `init` 'backup' | 'default' | 'minimum' | 'parent', nullable, required — The resources used when initializing services of the environment

## Response `default`

- AcceptedResponse
  - `status` string, required — The status text of the response
  - `code` integer, required — The status code of the response

---

[API](https://skmtc.net/upsun/apis/upsun-com-rest-api.md) · [All operations](https://skmtc.net/upsun/apis/upsun-com-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/upsun/upsun-com-rest-api/revisions/6cc88fde6435/schema)
