You can call the DescribeAvailableRecoveryTime operation to query the time range to which you can restore data by using a cross-region backup file.
To query the time range to which you can restore data by using a common backup file, see DescribeBackups.
Before you call this operation, make sure that the instance runs one of the following database engines:
- MySQL. For more information, see Back up an ApsaraDB RDS for MySQL instance across regions.
- PostgreSQL. For more information, see Back up an ApsaraDB RDS for PostgreSQL instance across regions.
Debugging
Request parameter
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeAvailableRecoveryTime |
The operation that you want to perform. Set the value to DescribeAvailableRecoveryTime. |
CrossBackupId | Integer | Yes | 14377 |
The ID of the cross-region backup file. You can call the DescribeCrossRegionBackups operation to query IDs of backup files. |
RegionId | String | No | cn-hangzhou |
The ID of the region. |
ResourceGroupId | String | No | rg-acfmy***** |
The ID of the resource group. |
DBInstanceId | String | No | rm-uf6wjk5***** |
The ID of the instance. You can call the DescribeDBInstances operation to query the ID of the instance. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RecoveryEndTime | String | 2019-06-12T07:33:12Z |
The end time to which data can be restored. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
RequestId | String | 8CCBF4BA-7CE1-47E1-B49F-E97EA200A40D |
The ID of the request. |
CrossBackupId | Integer | 14377 |
The ID of the cross-region backup file. |
RecoveryBeginTime | String | 2019-06-12T05:22:29Z |
The start time to which data can be restored. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
RegionId | String | cn-hangzhou |
The region ID of the source instance. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=DescribeAvailableRecoveryTime
&CrossBackupId=14377
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeAvailableRecoveryTimeResponse>
<RecoveryEndTime>2019-06-12T07:33:12Z</RecoveryEndTime>
<RecoveryBeginTime>2019-06-12T05:22:29Z</RecoveryBeginTime>
<RequestId>8CCBF4BA-7CE1-47E1-B49F-E97EA200A40D</RequestId>
<RegionId>cn-hangzhou</RegionId>
<CrossBackupId>14377</CrossBackupId>
</DescribeAvailableRecoveryTimeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RecoveryEndTime" : "2019-06-12T07:33:12Z",
"RecoveryBeginTime" : "2019-06-12T05:22:29Z",
"RequestId" : "8CCBF4BA-7CE1-47E1-B49F-E97EA200A40D",
"RegionId" : "cn-hangzhou",
"CrossBackupId" : 14377
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NoAvailableLogBackup | No available log backup. | The error message returned because no available backup files are found. |
400 | NoAvailableDisasterRestoreBakset | No available disaster restore bakset. | The error message returned because no available backup files are found. |
403 | CrossBackupNotSupport | Specified region not support cross region backup. | The error message returned because cross-zone backup is not supported in the specified region. |
404 | InvalidBackupSetID.NotFound | Specified backup set ID does not exist. | The error message returned because the specified backup file does not exist. You must check the existing backup files. |
For a list of error codes, visit the API Error Center.