All Products
Search
Document Center

ApsaraDB RDS:DescribeBackups

Last Updated:Apr 17, 2024

Queries the data backup files of an ApsaraDB RDS instance.

Operation description

Supported database engines

  • RDS MySQL
  • RDS PostgreSQL
  • RDS SQL Server
  • RDS MariaDB

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:DescribeBackupsREAD
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

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

rm-uf6wjk5xxxxxxx
BackupIdstringNo

The ID of the backup set.

327329803
BackupStatusstringNo

The status of the backup set. Valid values:

  • Success
  • Failed
Success
BackupModestringNo

The backup mode. 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.

2011-06-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.

Note We recommend that you specify a time range that is as short as possible to avoid timeout.
2011-06-15T16:00Z
PageSizeintegerNo

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

  • 30
  • 50
  • 100

Default value: 30.

30
PageNumberintegerNo

The number of the page to return. Valid values: any non-zero positive integer.

Default value: 1.

1
BackupTypestringNo

The backup type. Valid values:

  • FullBackup: full backup
  • IncrementalBackup: incremental backup
FullBackup
ResourceGroupIdstringNo

The resource group ID.

rg-acfmy*****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

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

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

0
PageRecordCountstring

The number of backup sets on the current page.

30
TotalRecordCountstring

The total number of entries returned.

100
PageNumberstring

The page number of the returned page.

1
Itemsobject []

The queried backup sets.

StorageClassstring

The storage class of the backup set. Valid values:

  • 0: regular storage
  • 1: archive storage
0
Encryptionstring

The encryption information about the backup set.

{}
BackupStatusstring

The state of the backup set.

Success
StoreStatusstring

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

  • Enabled: The backup set can be deleted.
  • Disabled: The backup set cannot be deleted.
Disabled
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
BackupTypestring

The backup type of the backup set. Valid values:

  • FullBackup
  • IncrementalBackup
FullBackup
CopyOnlyBackupstring

The backup mode of the backup set. Valid values:

  • 0: the standard mode. This mode supports full backups and incremental backups.
  • 1: the copy-only mode. This mode supports only full backups.
Note This parameter is returned only when the instance runs SQL Server.
0
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
MetaStatusstring

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

  • OK: The data backup file is normal.
  • LARGE: The data backup file contains an abnormally large number of tables. It cannot be used to restore individual databases or tables.
  • EMPTY: The data backup file is generated from a failed backup task.
Note If an empty string is returned, the data backup file cannot be used to restore individual databases or tables.
OK
BackupInitiatorstring

The initiator of the backup task. Valid values:

  • System
  • User
System
BackupIntranetDownloadURLstring

The URL that is used to download the backup set over an internal network. If the backup set cannot be downloaded, null is returned.

Note For example, if BackupMethod of an ApsaraDB RDS for SQL Server instance is set to Snapshot, a null string is returned.
http://rdsbak-hz-v3.oss-cn-hangzhou-internal.aliyuncs.com/xxxxx
BackupMethodstring

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

  • Logical: logical backup
  • Physical: physical backup
  • Snapshot: snapshot backup
Physical
BackupStartTimestring

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.

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

The URL that is used to download the backup set over the Internet. If the backup set cannot be downloaded, null is returned.

Note For example, if BackupMethod of an ApsaraDB RDS for SQL Server instance is set to Snapshot, a null 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
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
BackupSizelong

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

2167808
BackupModestring

The backup mode of the backup set. Valid values:

  • Automated
  • Manual
Automated
DBInstanceIdstring

The instance ID.

rm-uf6wjk5xxxxxxx
Checksumstring

The checksum. The value of this parameter is calculated by using the CRC64 algorithm.

1835830439**********
BackupDownloadLinkByDBobject []

An array consisting of URLs from which you can download backup sets of individual databases.

DataBasestring

The name of the database.

dbs
ResourceGroupIdstring

The resource group ID.

rg-acfmy*****

Examples

Sample success responses

JSONformat

{
  "RequestId": "1A6D328C-84B8-40DC-BF49-6C73984D7494",
  "TotalEcsSnapshotSize": 0,
  "PageRecordCount": "30",
  "TotalRecordCount": "100",
  "PageNumber": "1",
  "Items": {
    "Backup": [
      {
        "StorageClass": "0",
        "Encryption": "{}",
        "BackupStatus": "Success",
        "StoreStatus": "Disabled",
        "ConsistentTime": 1576506856,
        "BackupType": "FullBackup",
        "CopyOnlyBackup": "0",
        "BackupEndTime": "2019-02-13T12:20:00Z",
        "MetaStatus": "OK",
        "BackupInitiator": "System",
        "BackupIntranetDownloadURL": "http://rdsbak-hz-v3.oss-cn-hangzhou-internal.aliyuncs.com/xxxxx",
        "BackupMethod": "Physical",
        "BackupStartTime": "2019-02-03T12:20:00Z",
        "BackupDownloadURL": "http://rdsbak-hz-v3.oss-cn-hangzhou.aliyuncs.com/xxxxx",
        "IsAvail": 1,
        "BackupId": "321020562",
        "HostInstanceID": "5882781",
        "BackupSize": 2167808,
        "BackupMode": "Automated",
        "DBInstanceId": "rm-uf6wjk5xxxxxxx",
        "Checksum": "1835830439**********",
        "BackupDownloadLinkByDB": {
          "BackupDownloadLinkByDB": [
            {
              "IntranetDownloadLink": "https://cn-hangzhou-internal.bak.rds.aliyuncs.com/custins53664665/hins18676859_2021072909473127987849.zip?Expires=*****&dbList=tb1",
              "DataBase": "dbs",
              "DownloadLink": "https://cn-hangzhou.bak.rds.aliyuncs.com/custins53664665/hins18676859_2021072909473127987849.zip?Expires=*****&dbList=tb1"
            }
          ]
        },
        "ResourceGroupId": "rg-acfmy*****"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidRestoreTime.MalformedThe requested restoreTime param is invalid, or the requested restoreTime is not within the scope of the instance backup.-
400InvalidPageNumbers.MalformedSpecified page number is not valid.The page number cannot be found.
400InvalidStartTime.FormatSpecified start time is not valid.The start time is invalid.
400InvalidEndTime.FormatSpecified end time is not valid.The end time is invalid. Check the end time.
400InvalidParameterCombinationThe end time must be greater than the start timeThe end time must be later than the start time.
400InvalidDBinstanceClass.ValueNotSupportedThe specified parameter DBinstanceClass is invalid.The specified parameter DBinstanceClass is invalid.
400InvalidBackupSetLocation.FormatSpecified backup set location is not valid.-
403InvalidMaxRecordsPerPage.MalformedSpecified record number is not valid.-
403IncorrectDBInstanceStateCurrent DB instance state does not support this operation.-
404InvalidDBInstanceName.NotFoundThe database instance does not exist.The name of the RDS instance cannot be found. Check the name of the RDS instance.
404InvalidDBInstance.NotFoundThe specified instance does not exist or is not supported.The RDS instance cannot be found. Check the ID or name of the RDS instance.

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

Change history

Change timeSummary of changesOperation
2021-10-21The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.