You can call the DescribeDetachedBackups operation to query the data backup files of an instance that is deleted.
This operation is supported for instances that run MySQL with local SSDs. For more information about how to retain the data backup files of an instance after the instance is released, see Configure automatic backup.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDetachedBackups |
The operation that you want to perform. Set the value to DescribeDetachedBackups. |
DBInstanceId | String | No | rm-uf6wjk5xxxxxxx |
The ID of the instance. |
BackupId | String | No | 327xxxxx3 |
The ID of the data backup file. |
BackupStatus | String | No | Success |
The status of the data backup file. Valid values:
|
BackupMode | String | No | Automated |
The backup mode of the data backup file. Valid values:
|
StartTime | String | No | 2021-03-01T16:00Z |
The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. |
EndTime | String | No | 2021-03-15T16:00Z |
The end of the time range to query. The end time must be later than the start time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC. |
PageSize | Integer | No | 30 |
The number of entries to return on each page. Valid values:
Note Default value: 30.
|
PageNumber | Integer | No | 1 |
The number of the page to return. Valid values: any non-zero positive integer. Note Default value: 1.
|
Region | String | Yes | cn-hangzhou |
The region ID of the instance. |
ResourceGroupId | String | No | rg-acfmy***** |
The ID of the resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageNumber | String | 1 |
The page number of the returned page. |
RequestId | String | 1A6D328C-84B8-40DC-BF49-6C73984D7494 |
The ID of the request. |
PageRecordCount | String | 30 |
The number of data backup files on the page. |
TotalRecordCount | String | 100 |
The total number of entries returned. |
Items | Array of Backup |
The details of the returned data backup files. |
|
Backup | |||
ConsistentTime | Long | 1576506856 |
The point in time at which the data in the data backup file is consistent. The return value of this parameter is a timestamp. Note If the instance runs MySQL 5.6, a timestamp is returned. Otherwise, the value 0 is
returned.
|
StoreStatus | String | Disabled |
Indicates whether the data backup file can be deleted. Valid values:
|
BackupStatus | String | Success |
The status of the data backup file. Valid values:
|
BackupType | String | FullBackup |
The backup type. Valid values:
|
BackupStartTime | String | 2019-02-03T12:20:00Z |
The start time of the backup. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC. |
BackupDownloadURL | String | http://rdsbak-hz-v3.oss-cn-hangzhou.aliyuncs.com/xxxxx |
The URL that is used to download the data backup file over the Internet. If the data backup file cannot be downloaded, an empty string is returned. |
IsAvail | Integer | 1 |
Indicates whether the data backup file is available. Valid values:
|
MetaStatus | String | OK |
The status of the data backup file that is used to restore individual databases or tables. Valid values:
|
BackupEndTime | String | 2019-02-13T12:20:00Z |
The end time of the backup. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC. |
BackupId | String | 321020562 |
The ID of the data backup file. |
HostInstanceID | String | 5882781 |
The No. of the instance that generates the data backup file. This parameter is used to indicate whether the instance that generates the data backup file is a primary instance or a secondary instance. |
BackupIntranetDownloadURL | String | http://rdsbak-hz-v3.oss-cn-hangzhou-internal.aliyuncs.com/xxxxx |
The URL that is used to download the data backup file over an internal network. If the data backup file cannot be downloaded, an empty string is returned. |
BackupSize | Long | 2167808 |
The size of the data backup file. Unit: bytes. |
BackupMode | String | Automated |
The backup mode of the data backup file. Valid values:
|
DBInstanceId | String | rm-uf6wjk5xxxxxxx |
The ID of the instance. |
DBInstanceComment | String | test |
The description of the instance. |
BackupMethod | String | Physical |
The method that is used to generate the data backup file. Valid values:
|
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=DescribeDetachedBackups
&Region=cn-hangzhou
&<Common request parameters>
Sample success response
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDetachedBackupsResponse>
<TotalRecordCount>1</TotalRecordCount>
<PageRecordCount>1</PageRecordCount>
<RequestId>B0BBC25A-6B3E-4BFD-A052-48664294E20D</RequestId>
<PageNumber>1</PageNumber>
<Items>
<Backup>
<BackupMethod>Snapshot</BackupMethod>
<BackupInitiator>System</BackupInitiator>
<StorageClass>0</StorageClass>
<BackupMode>Automated</BackupMode>
<BackupSize>161061273600</BackupSize>
<BackupId>677987116</BackupId>
<IsAvail>1</IsAvail>
<HostInstanceID>9232003</HostInstanceID>
<BackupDBNames></BackupDBNames>
<StoreStatus>Disabled</StoreStatus>
<DBInstanceId>rm-uf6wjk5xxxxxxx</DBInstanceId>
<BackupDownloadURL></BackupDownloadURL>
<BackupEndTime>2020-07-11T05:07:33Z</BackupEndTime>
<BackupStartTime>2020-07-11T05:07:33Z</BackupStartTime>
<ConsistentTime>0</ConsistentTime>
<BackupType>FullBackup</BackupType>
<MetaStatus></MetaStatus>
<BackupScale>DBInstance</BackupScale>
<BackupStatus>Success</BackupStatus>
<BackupLocation>OSS</BackupLocation>
</Backup>
</Items>
<TotalBackupSize>161061273600</TotalBackupSize>
</DescribeDetachedBackupsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalRecordCount" : 1,
"PageRecordCount" : 1,
"RequestId" : "B0BBC25A-6B3E-4BFD-A052-48664294E20D",
"PageNumber" : 1,
"Items" : {
"Backup" : [ {
"BackupMethod" : "Physical",
"BackupIntranetDownloadURL" : "http://...",
"BackupMode" : "Automated",
"BackupSize" : 9405440,
"BackupId" : 509538643,
"IsAvail" : 1,
"HostInstanceID" : 100453678,
"BackupDBNames" : "",
"StoreStatus" : "Enabled",
"DBInstanceId" : "rm-uf6wjk5xxxxxxx",
"BackupDownloadURL" : "https://...",
"BackupEndTime" : "2020-09-04T02:55:36Z",
"BackupStartTime" : "2020-09-04T02:54:04Z",
"ConsistentTime" : "1599188049",
"BackupType" : "FullBackup",
"MetaStatus" : "OK",
"BackupScale" : "DBInstance",
"BackupStatus" : "Success",
"BackupLocation" : "OSS"
} ]
},
"TotalBackupSize" : "161061273600"
}
Error codes
For a list of error codes, visit the API Error Center.