This API is used to restore data to the original DB instance.
Name |
Mandatory |
Type |
Description |
---|---|---|---|
source |
Yes |
Object |
Specifies the instance from which the backup was created For details, see Table 3. |
target |
Yes |
Object |
Specifies the instance to which the backup is restored. For details, see Table 4. |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. |
type |
No |
String |
Specifies the restoration mode. Enumerated values include:
|
backup_id |
No |
String |
Specifies the ID of the backup to be restored. This parameter must be specified when the backup file is used for restoration. |
restore_time |
No |
String |
Specifies the time point of data restoration in the UNIX timestamp. The unit is millisecond and the time zone is UTC. NOTE:
This parameter takes effect only for replica set instances. |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
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. |
{ "source": { "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02", "type": "backup", "backup_id": "2f4ddb93-b901-4b08-93d8-1d2e472f30fe" }, "target": { "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02" } }
{ "source": { "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02", "type": "timestamp", "restore_time": 1532001446987 }, "target": { "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02" } }
Name |
Type |
Description |
---|---|---|
job_id |
String |
ID of the asynchronous task for the restore operation. |
{ "job_id": "a03b1b8a-b756-467c-8a49-38720c3d23ec" }
For more information, see Error Code.