# Restore
Restore the backup
# Same Server
# HTTP Request:
GET https://api.serveravatar.com/organizations/{organization}/backups/{backupId}/restore
# Curl Request example:
curl --request GET \
--url "https://api.serveravatar.com/organizations/5/backups/10/restore" \
--header 'content-type: application/json' \
--header 'Authorization: <YOUR API TOKEN>'
# Another Server
# HTTP Request:
POST https://api.serveravatar.com/organizations/{organization}/backups/{backup}/restore-to-another-server
# Parameter:
Parameter | Required | Type | Description |
---|---|---|---|
server_id | Yes | Integer | The ID of the target server where the backup should be restored. |
# Curl Request example:
curl --request POST \
--url "https://api.serveravatar.com/organizations/5/backups/10/restore-to-another-server" \
--header 'content-type: application/json' \
--header 'Authorization: <YOUR API TOKEN>' \
--data '{
"server_id": 12
}'
# Response:
# Backup Details:
- 200 (Ok)
{
"message": "Application backup restored in progress."
}
# Organization Not Found
- 404 (Not Found)
{
"message": "Organization not found!"
}
# Application Not found
- 404 (Not Found)
{
"message": "Application not found."
}
# Database Not found
- 404 (Not Found)
{
"message": "Database not found."
}
# Server Not Found
- 404 (Not Found)
{
"message": "Server not found."
}
# Backup Not Found
- 404 (Not Found)
{
"message": "Backup not found."
}
# Already In Progress
- 500 (Internal Server Error)
{
"message": "Restore is already in progress."
}
# Disk Error
- 500 (Internal Server Error)
{
"message": "You can not restore this backup because there is not enough disk space available on your server."
}
# Disk Error
- 500 (Internal Server Error)
{
"message": "You can not restore this backup because there is not enough disk space available on selected server."
}
# Application Limit Exceeded
- 500 (Internal Server Error)
{
"message": "You cannot add more than {Your Subscription Allowed Applications} applications in this account. Please upgrade or contact support."
}
# Server Not Connected
- 500 (Internal Server Error)
{
"message": "Your server is not connected."
}
# Application Exists
- 500 (Internal Server Error)
{
"message": "You cannot restore the backup because {Your application name} application already exists on the selected server."
}
# Duplicate Domain Name Found
- 500 (Internal Server Error)
{
"message": "Application domain is already exists on the selected server."
}
# Database Exists
- 500 (Internal Server Error)
{
"message": "You cannot restore the backup because the database already exists on the selected server."
}
# Database User Exists
- 500 (Internal Server Error)
{
"message": "You cannot restore the backup because database users already exist on the selected server."
}
# Unsupported Web Server
- 500 (Internal Server Error)
{
"message": "Backups cannot be restored to MERN servers."
}
# Unsupported Web Server
- 500 (Internal Server Error)
{
"message": "Backups cannot be restored from MERN server to another server."
}
# Server Error
- 500 (Internal Server Error)
{
"message": "Something went wrong."
}