Queries the backup details of a PolarDB cluster.

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.

DBClusterId String Yes pc-****************

The ID of the cluster.

BackupId String No 11111111

The ID of the backup set.

BackupStatus String No Success

The status of the backup set. Valid values:

  • Success
  • Failed
BackupMode String No Automated

The backup mode. Valid values:

  • Automated
  • Manual
StartTime String Yes 2020-11-14T00:00Z

The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format . The time must be in UTC.

EndTime String Yes 2020-11-16T00:00Z

The end of the time range to query. Specify the time in the YYYY-MM-DDThh:mmZ format. The time must be in UTC. The end time must be later than the start time.

BackupRegion String No cn-hangzhou

The region where the cross-region data backup file of the instance is stored.

Note This parameter is supported by only PolarDB for MySQL clusters.
PageSize Integer No 30

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

  • 30
  • 50
  • 100

Default value: 30.

PageNumber Integer No 1

The number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

Response parameters

Parameter Type Example Description
TotalRecordCount String 1

The total number of entries.

PageRecordCount String 1

The number of entries returned on the current page.

RequestId String 24A1990B-4F6E-482B-B8CB-75C612******

The ID of the request.

PageNumber String 1

The number of the returned page.

Items Array of Backup

The details of the backup set.

Backup
BackupSetSize String 4639948800

The size of the backup set. Unit: bytes.

Note After you delete the target snapshot backups, the storage space consumed by the backups is released. The released storage space is smaller than the size of the backup file, because the snapshots share certain data blocks. For more information, see FAQ about backup.
ConsistentTime String 1605425407

The snapshot checkpoint time. The value is a Unix timestamp.

BackupStatus String Success

The status of the backup set. Valid values:

  • Success
  • Failed
BackupType String FullBackup

The type of the backup. Only full backups are supported. Set the value to FullBackup.

BackupStartTime String 2020-11-15T07:30:05Z

The time when this backup task started. The time is displayed in UTC.

IsAvail String 0

Indicates whether the backup set is available. Valid values:

  • 0: The data backup file is unavailable.
  • 1: The data backup file is available.
BackupEndTime String 2020-11-15T07:30:20Z

The time when this backup task ended. The time is displayed in UTC.

BackupId String 61*******

The ID of the backup set.

DBClusterId String pc-****************

The ID of the cluster.

BackupsLevel String Level-1

The level of the backup set. Valid values:

  • Level-1: level-1 backup set
  • Level-2: level-2 backup set
BackupMode String Automated

The backup mode. Valid values:

  • Automated
  • Manual
BackupMethod String Snapshot

The backup method. Only snapshot backups are supported. The value is set to Snapshot.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=DescribeBackups
&DBClusterId=pc-****************
&StartTime=2020-11-14T00:00Z
&EndTime=2020-11-16T00:00Z
&BackupRegion=30
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeBackupsResponse>
    <TotalRecordCount>1</TotalRecordCount>
    <PageRecordCount>1</PageRecordCount>
    <RequestId>24A1990B-4F6E-482B-B8CB-75C612******</RequestId>
    <PageNumber>1</PageNumber>
    <Items>
        <BackupSetSize>4639948800</BackupSetSize>
        <ConsistentTime>1605425407</ConsistentTime>
        <BackupStatus>Success</BackupStatus>
        <BackupType>FullBackup</BackupType>
        <BackupStartTime>2020-11-15T07:30:05Z</BackupStartTime>
        <IsAvail>0</IsAvail>
        <BackupEndTime>2020-11-15T07:30:20Z</BackupEndTime>
        <BackupId>61*******</BackupId>
        <DBClusterId>pc-****************</DBClusterId>
        <BackupsLevel>Level-1</BackupsLevel>
        <BackupMode>Automated</BackupMode>
        <BackupMethod>Snapshot</BackupMethod>
    </Items>
</DescribeBackupsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalRecordCount" : "1",
  "PageRecordCount" : "1",
  "RequestId" : "24A1990B-4F6E-482B-B8CB-75C612******",
  "PageNumber" : "1",
  "Items" : [ {
    "BackupSetSize" : "4639948800",
    "ConsistentTime" : "1605425407",
    "BackupStatus" : "Success",
    "BackupType" : "FullBackup",
    "BackupStartTime" : "2020-11-15T07:30:05Z",
    "IsAvail" : "0",
    "BackupEndTime" : "2020-11-15T07:30:20Z",
    "BackupId" : "61*******",
    "DBClusterId" : "pc-****************",
    "BackupsLevel" : "Level-1",
    "BackupMode" : "Automated",
    "BackupMethod" : "Snapshot"
  } ]
}

Error codes

HTTP status code Error code Error message Description
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified DBClusterId does not exist in the current record.

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