This API is used to restore a database to an existing DB Instance.
This API is supported only for MySQL and Microsoft SQL Server DB engines.
Original DB Engine Version |
Restore To |
|---|---|
2017 Standard Edition |
2017 Standard Edition 2017 Enterprise Edition 2019 Standard Edition 2019 Enterprise Edition |
2017 Enterprise Edition |
2017 Enterprise Edition 2019 Enterprise Edition |
2019 Standard Edition |
2019 Standard Edition 2019 Enterprise Edition 2022 Standard Edition 2022 Enterprise Edition |
2019 Enterprise Edition |
2019 Standard Edition 2019 Enterprise Edition 2022 Enterprise Edition |
2022 Standard Edition |
2022 Standard Edition 2022 Enterprise Edition |
2022 Enterprise Edition |
2022 Standard Edition 2022 Enterprise Edition |
Name |
Mandatory |
Description |
|---|---|---|
project_id |
Yes |
Specifies the project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
Content-Type |
Yes |
String |
The content type. The default value is application/json. |
X-Auth-Token |
Yes |
String |
Specifies the user token. The user token is a response to the API used to obtain a user token. |
Name |
Mandatory |
Type |
Description |
|---|---|---|---|
source |
Yes |
Object |
Restoration information. For details, see Table 5. |
target |
Yes |
Object |
Instance to which the backup is restored. For details, see Table 6. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
instance_id |
Yes |
String |
Instance ID. |
type |
No |
String |
Restoration mode of the instance. Enumerated values include:
|
backup_id |
No |
String |
ID of the backup used to restore data. This parameter must be specified when the backup file is used for restoration. |
restore_time |
No |
Integer |
Time point of data restoration in the UNIX timestamp format. The unit is millisecond and the time zone is UTC. |
database_name |
No |
Map<String, String> |
Name of the new database after the restoration. If this parameter is available, you can restore specific databases and rename new databases.
Example:
"database_name":{"Original database name":"New database name"}
Correct example: "database_name":{"A":"A,A1,A2","B":"B1,B2","C":""} Wrong example: "database_name":{"A":"A","B":"B1,B2","C":"B1,C1","D":"D1,d1"}, Error causes are as follows:
|
restore_all_database |
No |
Boolean |
Whether to restore all databases to the target instance. This field is available only for Microsoft SQL Server. Enumerated values include:
The default value is false. |
POST https://rds.eu-de.otc.t-systems.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/recovery
{
"source": {
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01",
"type": "backup",
"backup_id": "2f4ddb93-b901-4b08-93d8-1d2e472f30fe"
},
"target": {
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01"
}
}
{
"source": {
"instance_id": "61879e6085bc44d1831b0ce62d988fd9in04",
"type": "backup",
"backup_id": "b021670e69ba4538b7b2ed07257306aebr04",
"restore_all_database":true
},
"target": {
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin04"
}
}
{
"source": {
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01",
"type": "timestamp",
"restore_time": 1532001446987
},
"target": {
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01"
}
}
{
"source": {
"instance_id": "61879e6085bc44d1831b0ce62d988fd9in04",
"type": "timestamp",
"restore_time": 1532001446987,
"database_name": {
"db1": "dbtest1",
"db3": ""
}
},
"target": {
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin04"
}
}
Name |
Type |
Description |
|---|---|---|
job_id |
String |
Indicates the job ID. |
{
"job_id": "ff80808157127d9301571bf8160c001d"
}
For details, see Abnormal Request Results.
For details, see Status Codes.
For details, see Error Codes.