Restoring Data to the Original DB Instance
Description
- This API is used to restore data to the original DB instance.
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
X-Language |
string |
header |
No |
Language |
|
project_id |
string |
path |
Yes |
Project ID. To obtain the project ID, see Obtaining a Project ID. |
Request Parameters
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
X-Auth-Token |
String |
Yes |
User token |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
source |
Object |
Yes |
The instance from which the backup was created For details, see Table 4. |
|
target |
Object |
Yes |
The instance to which the backup is restored. For details, see Table 5. |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
instance_id |
String |
Yes |
Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one. |
|
type |
String |
No |
The restoration mode. Enumerated values:
|
|
backup_id |
String |
No |
The ID of the backup to be restored. This parameter must be specified when the backup file is used for restoration. |
|
restore_time |
String |
No |
The point in time that data is restored in the UNIX timestamp. The unit is millisecond and the time zone is UTC.
NOTE:
This parameter takes effect only for replica set instances. |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
instance_id |
String |
Yes |
Specifies ID of the DB instance to be restored from a backup. You can call the API for querying DB Instances to obtain the DB instance ID. If you do not have an instance, you can call the API used for creating an instance. |
- Request example
- Restoring a backup:
{ "source": { "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02", "type": "backup", "backup_id": "2f4ddb93-b901-4b08-93d8-1d2e472f30fe" }, "target": { "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02" } } - Restoring to a point in time (applicable to replica set instances of versions 4.0, 4.2, and 4.4 and cluster instances of versions 4.0, 4.2, and 4.4)
{ "source": { "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02", "type": "timestamp", "restore_time": 1532001446987 }, "target": { "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02" } }
- Restoring a backup:
Response Parameters
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
job_id |
String |
Yes |
ID of the asynchronous task for the restore operation. |
- Example response
{ "job_id": "a03b1b8a-b756-467c-8a49-38720c3d23ec" }
Status Code
For details, see Status Code.
Error Code
For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot