This operation creates a DBS restore task.
Operation description
Related operations
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dbs:CreateRestoreTask |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| BackupPlanId |
string |
Yes |
The ID of the backup plan. |
dbs1hvb0ww**** |
| DestinationEndpointInstanceType |
string |
Yes |
The type of the destination endpoint. Valid values:
|
RDS |
| DestinationEndpointRegion |
string |
No |
The region ID of the destination database instance. Note
This parameter is required when DestinationEndpointInstanceType is set to |
cn-hangzhou |
| DestinationEndpointInstanceID |
string |
No |
The ID of the destination database instance. Note
This parameter is required when DestinationEndpointInstanceType is set to |
rm-bp1p8c29***** |
| DestinationEndpointIP |
string |
No |
The endpoint of the destination database. Note
This parameter is required when DestinationEndpointInstanceType is set to |
rm-bp*****9jv8pxero.mysql.rds.aliyuncs.com |
| DestinationEndpointPort |
integer |
No |
The port that is used to connect to the destination database. Note
This parameter is required when DestinationEndpointInstanceType is set to |
3306 |
| DestinationEndpointDatabaseName |
string |
No |
The name of the destination database. Note
This parameter is required if the database engine is PostgreSQL or MongoDB. |
test |
| DestinationEndpointUserName |
string |
No |
The username for the destination database account. Note
This parameter is optional if the database engine is Redis, or if |
test |
| DestinationEndpointPassword |
string |
No |
The password for the destination database account. Note
This parameter is optional if the database engine is Redis, or if |
Test |
| BackupGatewayId |
integer |
No |
The ID of the backup gateway. Note
This parameter is required when DestinationEndpointInstanceType is set to |
4312**** |
| RestoreObjects |
string |
No |
The objects to restore.
Note
You can use this API operation to restore data only at the database level. To restore data at the table level, log on to the console. For more information, see Restore databases. |
MySQL表级别恢复示例如下: [{\"DBName\":\"dbname\", \"NewDBName\":\"dbname1\"}] |
| RestoreTime |
integer |
No |
The point-in-time for the restore, specified as a UNIX timestamp in milliseconds. |
1554560477000 |
| BackupSetId |
string |
No |
The ID of the full backup set to use for the restore. The |
dbs1hvb0w***** |
| RestoreTaskName |
string |
Yes |
The name of the restore job. |
test |
| DestinationEndpointOracleSID |
string |
No |
The SID of the Oracle database. Note
This parameter is required if the database engine is Oracle. |
test |
| RestoreDir |
string |
No |
The restore directory. This parameter is required if DestinationEndpointInstanceType is set to |
test |
| RestoreHome |
string |
No |
The installation directory of the database. |
test |
| DuplicateConflict |
string |
No |
The policy for resolving same-name object conflicts. Valid value: renamenew: Renames the restored object if its name conflicts with an existing object. |
renamenew |
| CrossAliyunId |
string |
No |
The ID of the Alibaba Cloud account that owns the source database. This parameter is required for cross-account restores. |
2749528728******** |
| CrossRoleName |
string |
No |
The name of the RAM role used for the cross-account restore. |
test123 |
| ClientToken |
string |
No |
A client-generated token to ensure request idempotence. This token must be unique across requests. |
ETnLKlblzczshOTUbOC******** |
| RestoreDestinationMode |
string |
No |
The type of the restore destination. Valid values:
|
EXIST_INSTANCE |
| EnableDestinationEndpointSsl |
boolean |
No |
Specifies whether to enable SSL encryption to connect to the destination database. |
true |
| SslCaPem |
string |
No |
The SSL certificate used to connect to the destination database. Note This parameter is required when EnableDestinationEndpointSsl is set to true. |
-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- |
| DestDatabaseInstanceType |
string |
No |
The type of the new instance to create for the restore. Note This parameter is required when RestoreDestinationMode is set to NEW_INSTANCE. |
rds |
| DestDatabaseInstanceRegion |
string |
No |
The region where the new instance will be created. Note This parameter is required when RestoreDestinationMode is set to NEW_INSTANCE. |
cn-beijing |
| DestDatabaseInstanceVpc |
string |
No |
The VPC ID of the new instance. Note This parameter is required when RestoreDestinationMode is set to NEW_INSTANCE. |
vpc-xx |
| DestDatabaseInstanceClass |
string |
No |
The instance type of the new instance. Note This parameter is required when RestoreDestinationMode is set to NEW_INSTANCE. |
mysql.x4.large.2 |
| DestDatabaseInstanceStorageSize |
string |
No |
The storage space of the new instance. Unit: GB. Note This parameter is required when RestoreDestinationMode is set to NEW_INSTANCE. |
500 |
| DestDatabaseInstanceVSwitch |
string |
No |
The vSwitch ID of the new instance. Note This parameter is required when RestoreDestinationMode is set to NEW_INSTANCE. |
vsw-xx |
| DestDatabaseInstanceDatabaseVersion |
string |
No |
The database engine version of the new instance. Note This parameter is required when RestoreDestinationMode is set to NEW_INSTANCE. |
8.0 |
| AutoOpenDatabase |
string |
No |
Specifies whether to automatically start the Oracle instance after restoring a physical backup. Valid values: |
true |
| AutoShutdownDatabase |
string |
No |
Specifies whether to automatically stop the Oracle instance before restoring a physical backup. Valid values: |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| HttpStatusCode |
integer |
The HTTP status code returned for the request. |
200 |
| RequestId |
string |
The ID of the request. |
60AF7C5D-EF4D-4D48-8FD5-C0823FDF28AC |
| ErrCode |
string |
The error code returned if the request fails. |
Param.NotFound |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| ErrMessage |
string |
The error message returned if the request fails. |
The specified parameter %s value is not valid. |
| RestoreTaskId |
string |
The ID of the restore task. |
s102h***** |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "60AF7C5D-EF4D-4D48-8FD5-C0823FDF28AC",
"ErrCode": "Param.NotFound",
"Success": true,
"ErrMessage": "The specified parameter %s value is not valid. ",
"RestoreTaskId": "s102h*****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Request.Forbidden | Have no Permissions |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.