All Products
Search
Document Center

PolarDB:DescribeBackups

Last Updated:Nov 21, 2024

Queries the backup details of a PolarDB cluster.

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
polardb:DescribeBackupsget
*Backup
acs:polardb:{#regionId}:{#accountId}:DBCluster/{#DBClusterId}
*DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the cluster.

pc-****************
BackupIdstringNo

The ID of the backup set.

11111111
BackupStatusstringNo

The status of the backup set. Valid values:

  • Success
  • Failed
Success
BackupModestringNo

The backup mode. Valid values:

  • Automated
  • Manual
Automated
StartTimestringYes

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

2020-11-14T00:00Z
EndTimestringYes

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.

2020-11-16T00:00Z
BackupRegionstringNo

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

Note This parameter is valid only for PolarDB for MySQL clusters.
cn-hangzhou
PageSizeintegerNo

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

  • 30
  • 50
  • 100

Default value: 30.

30
PageNumberintegerNo

The page number. The value must be a positive integer that does not exceed the maximum value of the INTEGER data type. Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object
TotalRecordCountstring

The total number of returned entries.

1
PageRecordCountstring

The number of entries per page.

1
RequestIdstring

The ID of the request.

24A1990B-4F6E-482B-B8CB-75C612******
PageNumberstring

The page number.

1
Itemsarray<object>

The queried backup sets.

Backupobject
BackupSetSizestring

The size of the backup set. Unit: bytes.

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

The snapshot checkpoint time. The value follows the Unix time format. Unit: seconds.

1605425407
BackupStatusstring

The status of the backup set. Valid values:

  • Success
  • Failed
Success
BackupTypestring

The type of the backup. Only FullBackup may be returned.

FullBackup
BackupStartTimestring

The start time of the backup task. The time is displayed in UTC. Unit: seconds.

2020-11-15T07:30:05Z
ExpectExpireTimestring

The expected expiration time of the backup set (This parameter is supported only for clusters for which sparse backup is enabled).

2022-10-24T08:13:23Z
ExpectExpireTypestring

The expected expiration type of the backup set (This parameter is supported only for instances that are enabled with sparse backup).

Valid values:

  • NEVER

  • EXPIRED

  • DELAY

EXPIRED
IsAvailstring

Indicates whether the backup set is available. Valid values:

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

The end time of the backup task. The time is displayed in UTC.

2020-11-15T07:30:20Z
BackupIdstring

The ID of the backup set.

61*******
DBClusterIdstring

The ID of the cluster.

pc-****************
BackupsLevelstring

The level of the backup set. Valid values:

  • Level-1
  • Level-2
Level-1
BackupModestring

The backup mode. Valid values:

  • Automated
  • Manual
Automated
BackupMethodstring

The backup method. Only Snapshot may be returned.

Snapshot

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400InvalidDBClusterId.MalformedThe specified parameter DBClusterId is not valid.The specified DBClusterId parameter is invalid.
400InvalidBackupStatus.MalformedThe specified parameter BackupStatus is not valid.The specified BackupStatus parameter is invalid.
400InvalidBackupMode.MalformedThe specified parameter BackupMode is not valid.The specified BackupMode parameter is invalid.
400InvalidStartTime.MalformedThe specified parameter StartTime is not valid.The specified StartTime parameter is invalid.
400InvalidEndTime.MalformedThe specified parameter EndTime is not valid.The specified EndTime parameter is invalid.
400InvalidPageSize.MalformedThe specified parameter PageSize is not valid.The specified PageSize parameter is invalid.
400InvalidPageNumber.MalformedThe specified parameter PageNumber is not valid.The specified PageNumber parameter is invalid.
404InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.
404InvalidDBClusterId.NotFoundThe DBInstanceId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.

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

Change history

Change timeSummary of changesOperation
2023-09-12The Error code has changedView Change Details
2023-05-26The Error code has changed. The response structure of the API has changedView Change Details
2022-06-01The Error code has changed. The request parameters of the API has changedView Change Details