Skip to content
WP EngineDocumentation

Restore a backup

POST
/installs/{install_id}/backups/{backup_id}/restore
curl --request POST \
--url https://api.wpengineapi.com/v1/installs/294deacc-d8b8-4005-82c4-0727ba8ddde0/backups/e41fa98f-ea80-4654-b229-a9b765d0863a/restore \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "notification_emails": [ "myself@torquemag.com" ], "restore_database": true, "create_checkpoint": true }'

Restores the install to the state captured in the specified backup.

Limitations & Warnings

  • Asynchronous: the restore is started, not finished, when the response is returned. The addresses in notification_emails receive an email once it has completed.
  • By default the database is restored and a checkpoint is created first. Set restore_database or create_checkpoint to false to change this.
install_id
required
string format: uuid

ID of install

Example
294deacc-d8b8-4005-82c4-0727ba8ddde0
backup_id
required
string format: uuid

ID of backup to restore from

Example
e41fa98f-ea80-4654-b229-a9b765d0863a
Properties
  • notification_emails - required - The email address(es) that will receive an email once the restore has completed.
  • restore_database - optional (default: true) - Whether to restore the database from the backup.
  • create_checkpoint - optional (default: true) - Whether to create a checkpoint before restoring.
Media typeapplication/json
object
notification_emails
required

The email address(es) that will receive an email once the restore has completed.

Array<string>
restore_database

Whether to restore the database from the backup.

boolean
default: true
create_checkpoint

Whether to create a checkpoint before restoring.

boolean
default: true
Example
{
"notification_emails": [
"myself@torquemag.com"
],
"restore_database": true,
"create_checkpoint": true
}

Accepted. The restore has been initiated; the addresses in notification_emails are notified when it completes.

Bad Request

Media typeapplication/json
object
message
required

A message regarding the error that occurred on the server

string
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string
errors

An array of error objects describing specific errors that arose when servicing the request

Array<object>
object
resource
required

The name of the resource that was being processed when the error occurred

string
field
required

(Optional) The specific field associated with the error

string
type
required

(Optional) A type associated with the error. invalid_value, access_error, value_unavailable

string
code
required

(Optional) A machine code relating to the error that occurred with the field and resource

string
message
required

(Optional) A human-readable message relating to the error that occurred with the field and resource

string
Example
{
"message": "Invalid request.",
"errors": [
{
"resource": "Resource",
"field": "field_name",
"type": "invalid_value",
"code": "invalid",
"message": "The value is invalid."
}
]
}

Authentication Error

Media typeapplication/json
object
message
required

A message regarding the error that occurred on the server

string
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string
Example
{
"message": "Bad Credentials"
}

Not authorized

Media typeapplication/json
object
message
required

A message regarding the error that occurred on the server

string
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string
Example
{
"message": "You don't have permission to perform that action"
}

Not found

Media typeapplication/json
object
message
required

A message regarding the error that occurred on the server

string
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string
Example
{
"message": "Not Found"
}

Too many requests

Internal Server Error

Media typeapplication/json
object
message
required

A message regarding the error that occurred on the server

string
Example
{
"message": "An unexpected error occurred, please try again in a few minutes"
}

An invalid response was received from an upstream server

Service unavailable