Queries the backup sets of an ApsaraDB for RDS instance.

Note A backup set can be used to restore data only when its BackupStatus is Success.

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 DescribeBackups

The operation that you want to perform. Set the value to DescribeBackups.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

BackupId String No 327329803

The ID of the specific backup set to query.

BackupStatus String No Success

The status of the backup sets to query. Valid values:

  • Success
  • Failed
BackupMode String No Automated

The mode that is used to generate the backup set. Valid values:

  • Automated: automatic backup
  • Manual: manual backup
StartTime String No 2011-06-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 2011-06-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:mm format. The time must be in UTC.

PageSize Integer No 30

The number of entries to return on each page.

  • 30
  • 50
  • 100

Default value: 30.

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
TotalRecordCount String 100

The total number of entries returned.

PageNumber String 1

The page number of the returned page.

PageRecordCount String 30

The number of backup sets on the current page.

Items Array

An array that consists of backup sets.

Backup
BackupId String 321020562

The ID of the backup set.

DBInstanceId String rm-uf6wjk5xxxxxxx

The ID of the instance.

HostInstanceID String 5882781

The ID of the instance on which the backup set is generated. This parameter is used to determine whether the backup set is generated on a primary or secondary instance.

BackupStatus String Success

The status of the backup set.

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.

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.

BackupType String FullBackup

The type of the backup. Valid values:

  • FullBackup: indicates a full backup.
  • IncrementalBackup: indicates an incremental backup.
BackupMode String Automated

The mode of the backup. Valid values:

  • Automated: automatic backup
  • Manual: manual backup
BackupMethod String Physical

The method to use for backup. Valid values:

  • Logical: indicates a logical backup.
  • Physical: indicates a physical backup.
BackupDownloadURL String http://rdsbak-hz-v3.oss-cn-hangzhou.aliyuncs.com/xxxxx

The URL from which the backup set can be downloaded over the Internet. If the backup set cannot be downloaded over the Internet, a null string is returned.

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

The URL from which the backup set can be downloaded over an internal network. If the backup set cannot be downloaded an internal network, a null string is returned.

BackupSize Long 2167808

The size of the backup files in the backup set. Unit: bytes.

StoreStatus String Disabled

Indicates whether the backup set can be deleted. Valid values:

  • Enabled: The backup set can be deleted.
  • Disabled: The backup set cannot be deleted.
BackupInitiator String System

The initiator of the backup task. Valid values:

  • System: indicates that the backup task is initiated by the system.
  • User: indicates that the backup task is initiated by the user.
ConsistentTime Long 1576506856

The point in time at which the data in the backup set is consistent. The value returned for this parameter is a timestamp.

Note If the instance runs MySQL 5.6, a timestamp is returned. Otherwise, the value 0 is returned.
CopyOnlyBackup String 0

The mode that is used to generate the backup set. Valid values:

  • 0: the standard mode. This mode supports full backup and incremental backup.
  • 1: the copy-only mode. This mode only supports full backup.
    Note If the instance runs SQL Server, this parameter is returned.
IsAvail Integer 1

Indicates whether the backup set is available. Valid values:

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

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

  • OK: The backup set is normal.
  • LARGE: The backup set contains an abnormally large number of tables and cannot be used to restore databases or tables.
  • EMPTY: The backup set is generated from a failed backup.
Note If a null string is returned, database- and table-level restoration is disabled for the backup set.
StorageClass String 0

The storage media of the backup set. Valid values:

  • 0: regular storage
  • 1: archive storage
RequestId String 1A6D328C-84B8-40DC-BF49-6C73984D7494

The ID of the request.

TotalEcsSnapshotSize Long 0

The size of the snapshot chain of the instance. Unit: bytes.

Examples

Sample requests

http(s)://rds.aliyuncs.com/? Action=DescribeBackups
&DBInstanceId=rm-uf6wjk5xxxxxxx
&<Common request parameters>

Sample success responses

XML format

<DescribeBackupsResponse>
  <TotalRecordCount>1</TotalRecordCount>
  <PageRecordCount>1</PageRecordCount>
  <TotalEcsSnapshotSize>0</TotalEcsSnapshotSize>
  <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>
</DescribeBackupsResponse>

JSON format

{
    "TotalRecordCount": 1,
    "PageRecordCount": 1,
    "TotalEcsSnapshotSize": "0",
    "RequestId": "B0BBC25A-6B3E-4BFD-A052-48664294E20D",
    "PageNumber": 1,
    "Items": {
        "Backup": [
            {
                "BackupMethod": "Snapshot",
                "BackupInitiator": "System",
                "StorageClass": "0",
                "BackupMode": "Automated",
                "BackupSize": 161061273600,
                "BackupId": 677987116,
                "IsAvail": 1,
                "HostInstanceID": 9232003,
                "BackupDBNames": "",
                "StoreStatus": "Disabled",
                "DBInstanceId": "rm-uf6wjk5xxxxxxx",
                "BackupDownloadURL": "",
                "BackupEndTime": "2020-07-11T05:07:33Z",
                "BackupStartTime": "2020-07-11T05:07:33Z",
                "ConsistentTime": "0",
                "BackupType": "FullBackup",
                "MetaStatus": "",
                "BackupScale": "DBInstance",
                "BackupStatus": "Success",
                "BackupLocation": "OSS"
            }
        ]
    },
    "TotalBackupSize": "161061273600"
}

Error codes

For a list of error codes, visit the API Error Center.