Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
24 KiB
Restoring Metadata (a V3 API)
Function
This API is used to restore metadata.
Constraints
PITR indicates that a data node has been restored to a specified point in time.
For details about how to perform PITR on RDS for MySQL, see section "Data Restorations" > "Restoring Data to RDS for MySQL" > "PITR: Restoring a DB Instance to a Point in Time" in Working with RDS for MySQL.
You can also refer to section "Backup and Restoration" in RDS for MySQL API Reference.
URI
POST /v3/{project_id}/instances/{instance_id}/backups/metadata-recovery
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
project_id |
String |
Yes |
Project ID of a tenant in a region |
instance_id |
String |
Yes |
Instance ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Content-Type |
Yes |
String |
MIME type of the request body. Value range:
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
source |
Yes |
Source instance information |
|
target |
Yes |
Target instance information |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
restore_time |
No |
Long |
Restoration timestamp, accurate to milliseconds. (Either backup_id or restore_time needs to be specified.) |
backup_id |
No |
String |
Backup ID. (Either restore_time or backup_id needs to be specified.) |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
data_nodes |
Yes |
Array of strings |
Target data nodes. The data nodes are in the same VPC and subnet as the DDM instance and can communicate with the DDM instance. PITR has been completed on the data nodes. For details, see Constraints. |
instance_id |
Yes |
String |
Target instance ID. It can be obtained from Querying Instances Available for Restoration (a V3 API). |
Example Request
POST https://ddm.eu-de.otc.t-systems.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/1f5c9fd6cd984056ba89c8c87cc03278in09/backups/metadata-recovery
{
"source": {
"backup_id": "defa45b24d314e878fde930a61732e9dbr09"
},
"target": {
"instance_id": "2f0324a93859487eb5566d75951fcd2din09",
"data_nodes": [
"f4e2949e9b9b4d60b42c89ed39bfe34cin01"
]
}
}
Response
- Normal response
Table 6 Response body parameters Parameter
Type
Description
job_id
String
Task ID
- Normal response example
{ "job_id": "09902ee7866649b8908ec209bfee2747" } - Abnormal response
For details, see Abnormal Request Results.
Status Codes
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.