You can call the DescribeDetachedBackups operation to query the data backup files of an ApsaraDB RDS instance that is deleted.

This operation is supported for instances that run MySQL with local solid-state drives (SSDs). For more information about how to retain the data backup files of an instance after the instance is released, see Automatic and manual backups.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

Region String Yes cn-hangzhou

The region ID of the instance.

BackupId String No 327xxxxx3

The ID of the data backup file to query.

BackupStatus String No Success

The status of the data backup files to query. Valid values:

  • Success
  • Failed
BackupMode String No Automated

The backup mode of the data backup files to query. Valid values:

  • Automated
  • Manual
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.

Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

PageSize Integer No 30

The number of entries to return on each page. Valid values:

  • 30 (This is the default value.)
  • 50
  • 100
PageNumber Integer No 1

The number of the page to return.

Valid values: any non-zero positive integer. Default value: 1.

Response parameters

Parameter Type Example Description
Items Array of Backup

An array that consists of the data backup files returned.

Backup
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 URL is unavailable, an empty string is returned.

BackupEndTime String 2019-02-13T12:20:00Z

The end time of the task that is run to generate the data backup file.

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.

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 URL is unavailable, an empty string is returned.

BackupMethod String Physical

The backup method of the data backup file. Valid values:

  • Logical: logical backup
  • Physical: physical backup
BackupMode String Automated

The backup mode of the data backup file. Valid values:

  • Automated
  • Manual
BackupSize Long 2167808

The size of the data backup file. Unit: bytes.

BackupStartTime String 2019-02-03T12:20:00Z

The start time of the task that is run to generate the data backup file.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

BackupStatus String Success

The status of the data backup file.

BackupType String FullBackup

The backup type of the data backup file. Valid values:

  • FullBackup: full backup
  • IncrementalBackup: incremental backup
ConsistentTime Long 1576506856

The point in time at which the data in the data backup file is consistent. The value of this parameter is a timestamp.

Note This parameter is supported only when the instance runs MySQL 5.6. If the instance does not run MySQL 5.6, the value 0 is returned.
DBInstanceId String rm-uf6wjk5xxxxxxx

The ID of the instance.

HostInstanceID String 5882781

The serial number of the instance that generates the data backup file. You can use this parameter to check whether the data backup file is generated on the primary or secondary instance.

IsAvail Integer 1

Indicates whether the data backup file is available. Valid values:

  • 0: The data backup file is unavailable.
  • 1: The data backup file is available.
MetaStatus String OK

The status of the data backup file that is used to restore individual databases and tables. Valid values:

  • OK: The data backup file is normal.
  • LARGE: The data backup file contains the data of an abnormally large number of tables and cannot be used to restore individual databases or tables.
  • EMPTY: The data backup file is generated from a failed backup.
StoreStatus String Disabled

Indicates whether the data backup file can be deleted. Valid values:

  • Enabled: The data backup file can be deleted.
  • Disabled: The data backup file cannot be deleted.
PageNumber String 1

The page number of the returned page.

PageRecordCount String 30

The number of data backup files on the page.

RequestId String 1A6D328C-84B8-40DC-BF49-6C73984D7494

The ID of the request.

TotalRecordCount String 100

The total number of data backup files returned.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDetachedBackups
&Region=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<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

{
    "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.