All Products
Search
Document Center

AnalyticDB:DescribeDataBackups

Last Updated:Oct 10, 2024

Queries a list of backup sets of full backup or point-in-time backup for an AnalyticDB for PostgreSQL instance.

Operation description

You can call this operation to query a list of backup sets and backup details only for instances in elastic storage mode.

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
gpdb:DescribeDataBackupsget
  • DBInstance
    acs:gpdb:*:{#accountId}:dbinstance/{#DBInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

Note You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.
gp-bp***************
BackupIdstringNo

The ID of the backup set. If you specify BackupId, the details of the backup set are returned.

Note You can call the DescribeDataBackups operation to query the information about all backup sets of an instance, including backup set IDs.
327329803
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.

2011-06-01T15:00Z
EndTimestringYes

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

2011-06-01T16:00Z
PageSizeintegerNo

The number of entries per page. Valid values:

  • 30
  • 50
  • 100

Default value: 30.

30
PageNumberintegerNo

The page number. Pages start from page 1. Default value: 1

1
DataTypestringNo

The backup type. Valid values:

  • DATA: full backup.
  • RESTOREPOI: point-in-time recovery backup.

If you do not specify this parameter, the backup sets of full backup are returned.

DATA
BackupModestringNo

The backup mode. Valid values:

  • Automated
  • Manual

If you do not specify this parameter, all backup sets are returned.

Automated
BackupStatusstringNo

The state of the backup set. Valid values:

  • Success
  • Failed

If you do not specify this parameter, all backup sets are returned.

Success

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries per page.

1
RequestIdstring

The request ID.

3E387971-33A5-5019-AD7F-DC**********
PageNumberinteger

The page number.

1
TotalCountinteger

The total number of entries returned.

1
TotalBackupSizelong

The total backup set size. Unit: Byte.

1111111111
Itemsarray<object>

The instance ID.

Backupobject
DataTypestring

The type of the backup. Valid values:

  • DATA: full backup
  • RESTOREPOI: point-in-time backup
DATA
ConsistentTimelong
  • For full backup, this parameter indicates the point in time at which the data in the data backup file is consistent.
  • For point-in-time backup, this parameter indicates that the returned point in time is a timestamp.
1576506856
BackupStatusstring

The status of the backup set. Valid values:

  • Success
  • Failure
Success
BackupStartTimestring

The UTC time when the backup started. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

2021-12-22T12:00:25Z
BackupEndTimestring

The UTC time when the backup ended. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

2021-12-22T12:01:43Z
BackupEndTimeLocalstring

The local time when the backup ended. The time is in the yyyy-MM-dd HH:mm:ss format. The time is your local time.

2021-12-22 20:00:25
BackupSetIdstring

The ID of the backup set.

1111111111
BaksetNamestring

The name of a point-in-time backup set or the full backup set.

adbpgbackup_555*****_20211222200019
BackupSizelong

The size of the backup file. Unit: bytes.

2167808
BackupModestring

The backup mode.

Valid values for full backup:

  • Automated: automatic backup
  • Manual: manual backup

Valid values for point-in-time backup:

  • Automated: point-in-time backup after full backup
  • Manual: manual point-in-time backup
  • Period: point-in-time backup that is triggered by a backup policy
Automated
BackupStartTimeLocalstring

The local time when the backup started. The time is in the yyyy-MM-dd HH:mm:ss format. The time is your local time.

2011-05-30 03:29:00
DBInstanceIdstring

The ID of the instance.

gp-bp**************-master
BackupMethodstring

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

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

Examples

Sample success responses

JSONformat

{
  "PageSize": 1,
  "RequestId": "3E387971-33A5-5019-AD7F-DC**********",
  "PageNumber": 1,
  "TotalCount": 1,
  "TotalBackupSize": 1111111111,
  "Items": [
    {
      "DataType": "DATA",
      "ConsistentTime": 1576506856,
      "BackupStatus": "Success",
      "BackupStartTime": "2021-12-22T12:00:25Z",
      "BackupEndTime": "2021-12-22T12:01:43Z",
      "BackupEndTimeLocal": "2021-12-22 20:00:25",
      "BackupSetId": "1111111111",
      "BaksetName": "adbpgbackup_555*****_20211222200019",
      "BackupSize": 2167808,
      "BackupMode": "Automated",
      "BackupStartTimeLocal": "2011-05-30 03:29:00",
      "DBInstanceId": "gp-bp**************-master",
      "BackupMethod": "Physical"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-08-29The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-08-17The response structure of the API has changedView Change Details