Skip to content

Restore Database Snapshot

POST
/dbaas/{managed_db_id}/snapshots/{snapshot_id}/restore/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/dbaas/{managed_db_id}/snapshots/{snapshot_id}/restore/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "orders-db-restore"
}'

Creates a new database from the snapshot and returns it as Creating. The database the snapshot came from is not changed and keeps running. The new database has the source’s plan, PostgreSQL version, region and storage size. It holds the data, databases and users that were in the snapshot. It does not take over the source’s IP allowlist, VPC, parameter group, deletion protection or snapshot schedule. It is a separate database. Poll the new database by its id until status is Running. The source database may be in any status. Restore from a Completed snapshot; the API does not check the snapshot’s status. Needs the Create permission for DBaaS.

managed_db_id
required
integer

Database ID

snapshot_id
required
integer

Snapshot ID

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
name

Name of the new database, not used by another database in the project. Defaults to the source database’s name followed by -restore. The API checks only that the name is free; use a name that follows the name rule of Create Database.

string
<= 50 characters

Example

orders-db-restore

The new database, as Creating

Media typeapplication/json
object
code
integer
message
string
data

The new database; the main fields are shown here.

object
id
integer
name
string
engine
string
engine_version
string
status
string
cpu
string
nullable
memory
string
nullable
disk_size

Storage in GB.

integer
nullable
location
string
created_at
string
errors
object

Example

{
"code": 201,
"message": "Created Successfully",
"data": {
"id": 131,
"name": "orders-db-restore",
"engine": "postgresql",
"engine_version": "16",
"status": "Creating",
"cpu": "2",
"memory": "8Gi",
"disk_size": 50,
"location": "Chennai",
"created_at": "2026-10-26T10:02:11Z"
},
"errors": {}
}

Another database in the project already has the name. A missing or invalid project ID gives errors “Project ID is missing or invalid”.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
object

Example

{
"code": 400,
"message": "Bad Request",
"data": {},
"errors": {
"name": "A database with the same name already exists in the Project."
}
}

The caller lacks the permission the call needs on the project, or the region is not allowed.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 403,
"message": "Forbidden",
"data": {},
"errors": "You don't have permission to access this service. Please verify your policy or project."
}

No database with that ID in the project and region (“Invalid request! Database Not Found”), or no snapshot with that ID on the database.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 404,
"message": "Bad Request",
"data": {},
"errors": "Snapshot not found."
}

The restore could not be started. The new database is not kept, and the restore shows as Failed in List Database Restores.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 412,
"message": "Precondition Failed",
"data": {},
"errors": "Error occurred at backend! Please try after sometime."
}