All Products
Search
Document Center

ApsaraDB RDS:DescribeDetachedBackups

Last Updated:Nov 22, 2024

Queries the data backup files of an ApsaraDB RDS instance that is released.

Operation description

Supported database engine

MySQL

Note This operation is available only for instances that use local disks.

References

Note Before you call this operation, read the following documentation and make sure that you fully understand the prerequisites and impacts of this operation.

For more information about how to retain the data backup files of an instance after the instance is released, see Configure automatic backup.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rds:DescribeDetachedBackupsget
*DBInstance
acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringNo

The instance ID. You can call the DescribeDBInstances operation to query the instance ID.

rm-uf6wjk5xxxxxxx
BackupIdstringNo

The ID of the backup set.

327xxxxx3
BackupStatusstringNo

The status of the backup set. Valid values:

  • Success
  • Failed
Success
BackupModestringNo

The backup method. Valid values:

  • Automated
  • Manual
Automated
StartTimestringNo

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.

2021-03-01T16:00Z
EndTimestringNo

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.

2021-03-15T16:00Z
PageSizeintegerNo

The number of entries per page. Valid values:

  • 30
  • 50
  • 100
Note The default value is 30.
30
PageNumberintegerNo

The page number. Pages start from page 1.

Note The default value is 1.
1
RegionstringYes

The region ID of the instance.

cn-hangzhou
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmy*****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

PageNumberstring

The page number.

1
RequestIdstring

The request ID.

1A6D328C-84B8-40DC-BF49-6C73984D7494
PageRecordCountstring

The number of entries per page.

30
TotalRecordCountstring

The total number of entries returned.

100
Itemsarray<object>

The queried backup sets.

Backupobject
ConsistentTimelong

The point in time at which the data in the backup set 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.
1576506856
StoreStatusstring

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

  • Enabled
  • Disabled
Disabled
BackupStatusstring

The status of the backup set. Valid values:

  • Success
  • Failed
Success
BackupTypestring

The backup type of the backup file. Valid values:

  • FullBackup
  • IncrementalBackup
FullBackup
BackupStartTimestring

The start time of the backup task.

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

2019-02-03T12:20:00Z
BackupDownloadURLstring

The URL that is used to download the diagnostic report over the Internet. If the diagnostic report cannot be downloaded, an empty string is returned.

http://rdsbak-hz-v3.oss-cn-hangzhou.aliyuncs.com/xxxxx
IsAvailinteger

Indicates whether the backup set is available. Valid values:

  • 0: The backup set is unavailable.
  • 1: The backup set is available.
1
MetaStatusstring

The status of the backup set that is used to restore individual databases or tables. Valid values:

  • OK: The backup set is normal.
  • LARGE: The backup set contains an abnormally large number of tables. It cannot be used to restore individual databases or tables.
  • EMPTY: The backup set is generated from a failed backup task.
OK
BackupEndTimestring

The end time of the backup task.

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

2019-02-13T12:20:00Z
BackupIdstring

The ID of the backup set.

321020562
HostInstanceIDstring

The ID of the instance that generates the backup set. This parameter is used to indicate whether the instance that generates the backup set is a primary instance or a secondary instance.

5882781
BackupIntranetDownloadURLstring

The URL that is used to download the log file over an internal network. If the log file cannot be downloaded, an empty string is returned.

http://rdsbak-hz-v3.oss-cn-hangzhou-internal.aliyuncs.com/xxxxx
BackupSizelong

The backup size. Unit: bytes.

2167808
BackupModestring

The backup method. Valid values:

  • Automated
  • Manual
Automated
DBInstanceIdstring

The instance ID.

rm-uf6wjk5xxxxxxx
DBInstanceCommentstring

The description of the instance.

test
BackupMethodstring

The method that is used to generate the data backup file. Valid values:

  • Logical: logical backup
  • Physical: physical backup
Physical

Examples

Sample success responses

JSONformat

{
  "PageNumber": "1",
  "RequestId": "1A6D328C-84B8-40DC-BF49-6C73984D7494",
  "PageRecordCount": "30",
  "TotalRecordCount": "100",
  "Items": {
    "Backup": [
      {
        "ConsistentTime": 1576506856,
        "StoreStatus": "Disabled",
        "BackupStatus": "Success",
        "BackupType": "FullBackup",
        "BackupStartTime": "2019-02-03T12:20:00Z",
        "BackupDownloadURL": "http://rdsbak-hz-v3.oss-cn-hangzhou.aliyuncs.com/xxxxx",
        "IsAvail": 1,
        "MetaStatus": "OK",
        "BackupEndTime": "2019-02-13T12:20:00Z",
        "BackupId": "321020562",
        "HostInstanceID": "5882781",
        "BackupIntranetDownloadURL": "http://rdsbak-hz-v3.oss-cn-hangzhou-internal.aliyuncs.com/xxxxx",
        "BackupSize": 2167808,
        "BackupMode": "Automated",
        "DBInstanceId": "rm-uf6wjk5xxxxxxx",
        "DBInstanceComment": "test",
        "BackupMethod": "Physical"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-11-20API Description Update. The Error code has changedView Change Details
2022-08-04The request parameters of the API has changedView Change Details