You can call the CheckCreateDdrDBInstance operation to check whether the data of a source instance can be restored to a destination instance by using a cross-region backup set.
Before you call this operation, make sure that the source instance runs one of the following database engines:
- MySQL. For more information, see Back up an ApsaraDB RDS for MySQL instance across regions.
- SQL Server. For more information, see Back up an ApsaraDB RDS for SQL Server instance across regions.
- PostgreSQL. For more information, see Back up an ApsaraDB RDS for PostgreSQL instance across regions.Note If your ApsaraDB RDS for PostgreSQL instance uses the new architecture and is created after October 10, 2022, this feature is not supported for your instance. For more information, see [Notice] SLR authorization is required to create an ApsaraDB RDS for PostgreSQL instance from October 10, 2022.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CheckCreateDdrDBInstance | The operation that you want to perform. Set the value to CheckCreateDdrDBInstance. |
RegionId | String | Yes | cn-hangzhou | The region ID of the destination instance. You can call the DescribeRegions operation to query the most recent region list. |
Engine | String | Yes | MySQL | The database engine of the destination instance. Valid values:
|
EngineVersion | String | Yes | 5.6 | The major engine version of the destination instance. The value of this parameter varies based on the value of the Engine parameter.
|
DBInstanceClass | String | Yes | rds.mysql.s1.small | The instance type of the destination instance. For more information, see Primary ApsaraDB RDS instance types. |
DBInstanceStorage | Integer | Yes | 20 | The storage capacity of the destination instance. Valid values: 5 to 2000. Unit: GB. This value must be a multiple of 5 GB. For more information, see Primary ApsaraDB RDS instance types. |
RestoreType | String | Yes | 0 | The restoration method that you want to use. Valid values:
Default value: 0. |
BackupSetId | String | No | 14358 | The ID of the backup set that is used for the restoration. You can call the DescribeCrossRegionBackups operation to query the ID of the backup set. Note If you set the RestoreType parameter to 0, you must also specify this parameter. |
RestoreTime | String | No | 2019-05-30T03:29:10Z | The point in time to which you want to restore data. The point in time that you specify must be earlier than the current time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note If you set the RestoreType parameter to 1, you must also specify this parameter. |
SourceRegion | String | No | cn-hangzhou | The region ID of the source instance if you want to restore data to a point in time. Note If you set the RestoreType parameter to 1, you must also specify this parameter. |
SourceDBInstanceName | String | No | rm-uf6wjk5xxxxxxx | The ID of the source instance if you want to restore data to a point in time. Note If you set the RestoreType parameter to 1, you must also specify this parameter. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
IsValid | String | true | Indicates whether the data of the source instance can be restored across regions. Valid values: true and false. |
RequestId | String | 1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC | The ID of the request. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=CheckCreateDdrDBInstance
&RegionId=cn-hangzhou
&Engine=MySQL
&DBInstanceClass=rds.mysql.s1.small
&DBInstanceStorage=20
&EngineVersion=5.6
&RestoreType=0
&BackupSetId=14358
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CheckCreateDdrDBInstanceResponse>
<IsValid>true</IsValid>
<RequestId>346C62D7-8BB9-4516-93E7-25A469EAABCB</RequestId>
</CheckCreateDdrDBInstanceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"IsValid" : "true",
"RequestId" : "346C62D7-8BB9-4516-93E7-25A469EAABCB"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IncorrectDBInstanceType | Current DB instance engine and type does not support operations. | The error message returned because the operation is not supported for the database engine and instance type of the instance. |
400 | InvalidRestoreType.Format | Specified restore type is not valid. | The error message returned because the specified restoration type is invalid. Specify a valid restoration type. |
400 | NoBackupSetRegion | BackupSetRegion is absence. | The error message returned because the backup region does not exist. |
400 | IncorrectBackupSetType | Backup set type should be ddr. | The error message returned because the type of the backup set is not DDR. |
400 | NoSourceInstanceName | No SourceDBInstanceName. | The error message returned because the name of the source instance is not found. |
400 | NoAvailableDisasterRestoreBakset | No available disaster restore bakset. | The error message returned because no available backup sets are found. |
400 | IncorrectBackupSetMethod | Current backup set method does not support operations. | The error message returned because the specified backup set cannot be used to restore individual databases and tables. |
400 | InvalidBackupType.Format | Specified backup type is not valid. | The error message returned because the specified backup type is invalid. |
400 | IncorrectEngineVersion | Current engine version does not support operations. | The error message returned because this operation is not supported for the database engine version that is run on the instance. |
400 | IncorrectBaksetVersion | Current bakset version does not support operations. | The error message returned because the operation is not supported for the version of the backup set. |
400 | CrossRegionUnsupportTDE | Cross-region disaster restore not support TDE bakset. | The error message returned because the TDE-based backup set cannot be used to restore an instance to another region. |
400 | DisasterRestoreRegionNotMatched | Disaster restore should be operated in the ddr region or source region. | The error message returned because the disaster recovery must be performed in the region of the source or destination instance. |
400 | InvalidMinorVersion.NotFound | Specified minor version does not exists. | The error message returned because the specified minor engine version does not exist. |
400 | InvalidDBInstanceId.MalFormed | The specified parameter DBInstanceId is not valid. | The error message returned because the instance ID is invalid. Check the instance ID. |
400 | InvalidEngine.Malformed | Specified engine is not valid. | The error message returned because the database engine is invalid. Specify a valid database engine. |
400 | InvalidEngineVersion.Malformed | Specified engine version is not valid. | The error message returned because the specified database engine version is invalid. Check the database engine version and try again. |
400 | MissingUserID | The request is missing a user_id parameter. | The error message returned because the specified user ID does not exist. |
400 | MissingUID | The request is missing a uid parameter. | The error message returned because the account that you use does not exist. |
400 | UserPermissionFailure | The request processing has failed due to user permission. | The error message returned because you do not have the required permissions. |
400 | InvalidServiceType.Format | Specified service type is not valid. | The error message returned because the service type is invalid. Set the service type to 0 or 1. The value 0 indicates an Alibaba Cloud service, and the value 1 indicates a JST service. |
400 | InvalidStorage.Format | Specified Storage is not valid. | The error message returned because the value of the Storage parameter is invalid. Specify a valid value for the parameter. |
403 | IncorrectDBType | The current DB type does not support this operation. | The error message returned because this operation is not supported by the database engine of the instance. Specify a different database engine. |
403 | IncorrectDBInstance | The current DB instance does not support this operation. | The error message returned because the operation is not supported by the instance. |
403 | ResourceConfigError | The request processing has failed due to resource config error. | The error message returned because a resource configuration error occurs. |
404 | RestoreType.NotFound | RestoreType is not found. | The error message returned because the specified restoration method does not exist. |
404 | InvalidBackupSetID.NotFound | Specified backup set ID does not exist. | The error message returned because the specified backup set does not exist. Specify a valid backup set. |
404 | InvalidDBInstance.NotFound | The specified instance does not exist or is not supported. | The error message returned because the specified instance cannot be found. Check the ID of the instance. |
404 | InvalidDBInstanceClass.NotFound | Specified DB instance class is not found. | The error message returned because the new instance type cannot be found or is no longer available for purchase. Select an available instance type. |
For a list of error codes, see Service error codes.