All Products
Search
Document Center

PolarDB:DescribeBackupPolicy

Last Updated:Oct 10, 2024

Queries the automatic backup policy 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.

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:DescribeBackupPolicyget
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of cluster.

Note You can call the DescribeDBClusters operation to query information about all clusters that are deployed in a specified region, such as the cluster ID.
pc-*************

Response parameters

ParameterTypeDescriptionExample
object
PreferredBackupPeriodstring

The backup cycle. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
DataLevel1BackupRetentionPeriodstring

The retention period of level-1 backups. Valid values: 3 to 14. Unit: day.

7
RequestIdstring

The ID of the request.

EADFCE0F-9FB5-4685-B395-1440B******
PreferredBackupTimestring

The time period when automatic backups are performed. The format is HH:mmZ-HH:mmZ. The time is displayed in UTC.

07:00Z-08:00Z
BackupRetentionPolicyOnClusterDeletionstring

Indicates whether backups are retained when you delete a cluster. Valid values:

  • ALL: permanently retains all backups.
  • LATEST: permanently retains only the last backup.
  • NONE: does not retain backups.
NONE
PreferredNextBackupTimestring

The time when the next automatic backup will be performed. The format is YYYY-MM-DDThh:mmZ. The time is displayed in UTC.

2020-11-16T07:30Z
DataLevel2BackupRetentionPeriodstring

The retention period of level-2 backups. Valid values:

  • 0: The level-2 backup feature is disabled.
  • 30 to 7300: Level-2 backups are retained for 30 to 7,300 days.
  • -1: Level-2 backups are permanently retained.
Note The default value is 0. By default, the level-2 backup feature is disabled when you create a cluster.
0
BackupFrequencystring

The backup frequency. Default value: Normal. Valid values:

  • Normal: standard backup. The system backs up data once a day.
  • 2/24H: enhanced backup. The system backs up data every 2 hours.
  • 3/24H: enhanced backup. The system backs up data every 3 hours.
  • 4/24H: enhanced backup. The system backs up data every 4 hours.
Note
  • If enhanced backup is enabled, all backups are retained for 24 hours. Backups are automatically deleted when the retention period ends. However, the system permanently retains the first backup that is created after 00:00 every day.
  • If enhanced backup is enabled, PreferredBackupPeriod is automatically set to all days in a week (from Monday to Sunday).
  • Normal
    DataLevel1BackupFrequencystring

    The backup frequency of level-1 backups. Default value: Normal. Valid values:

    • Normal: standard backup. The system backs up data once a day.
    • 2/24H: frequent backup. The system backs up data every 2 hours.
    • 3/24H: frequent backup. The system backs up data every 3 hours.
    • 4/24H: frequent backup. The system backs up data every 4 hours.
    Note
  • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters.
  • This parameter is unavailable if the region where your PolarDB for MySQL cluster is deployed does not support the cross-region backup feature. For information about regions that support the cross-region backup feature, see Overview .
  • Normal
    DataLevel1BackupPeriodstring

    The backup cycle of level-1 backups. Valid values:

    • Monday
    • Tuesday
    • Wednesday
    • Thursday
    • Friday
    • Saturday
    • Sunday
    Note
  • You need to specify at least two values. Separate multiple values with commas (,).
  • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters.
  • This parameter is unavailable if the region where your PolarDB for MySQL cluster is deployed does not support the cross-region backup feature. For information about regions that support the cross-region backup feature, see Overview .
  • Monday,Tuesday
    DataLevel1BackupTimestring

    The period of time during which automatic backup is performed. The value must be in the hh:mmZ-hh:mmZ format. The time must be in UTC. The start time and the end time must be on the hour and must have an interval of 1 hour. Example: 14:00Z-15:00Z.

    Note
  • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters.
  • This parameter is unavailable if the region where your PolarDB for MySQL cluster is deployed does not support the cross-region backup feature. For information about regions that support the cross-region backup feature, see Overview .
  • 15:00Z-16:00Z
    DataLevel2BackupPeriodstring

    The backup cycle of level-2 backups. Valid values:

    • Monday
    • Tuesday
    • Wednesday
    • Thursday
    • Friday
    • Saturday
    • Sunday
    Note
  • You need to specify at least two values. Separate multiple values with commas (,).
  • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters.
  • This parameter is unavailable if the region where your PolarDB for MySQL cluster is deployed does not support the cross-region backup feature. For information about regions that support the cross-region backup feature, see Overview .
  • Monday,Tuesday
    DataLevel2BackupAnotherRegionRetentionPeriodstring

    The retention period of cross-region level-2 backups. Valid values:

    • 0: The cross-region level-2 backup feature is disabled.
    • 30 to 7300: Cross-region level-2 backups are retained for 30 to 7,300 days.
    • 1: Cross-region level-2 backups are permanently retained.
    Note The default value is 0. By default, the level-2 backup feature is disabled when you create a cluster.
    30
    DataLevel2BackupAnotherRegionRegionstring

    The region where the cross-region level-2 backup is stored. For information about regions that support the cross-region backup feature, see Overview .

    cn-hangzhou

    Examples

    Sample success responses

    JSONformat

    {
      "PreferredBackupPeriod": "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
      "DataLevel1BackupRetentionPeriod": "7",
      "RequestId": "EADFCE0F-9FB5-4685-B395-1440B******",
      "PreferredBackupTime": "07:00Z-08:00Z",
      "BackupRetentionPolicyOnClusterDeletion": "NONE",
      "PreferredNextBackupTime": "2020-11-16T07:30Z",
      "DataLevel2BackupRetentionPeriod": "0",
      "BackupFrequency": "Normal",
      "DataLevel1BackupFrequency": "Normal",
      "DataLevel1BackupPeriod": "Monday,Tuesday",
      "DataLevel1BackupTime": "15:00Z-16:00Z",
      "DataLevel2BackupPeriod": "Monday,Tuesday",
      "DataLevel2BackupAnotherRegionRetentionPeriod": "30",
      "DataLevel2BackupAnotherRegionRegion": "cn-hangzhou"
    }

    Error codes

    HTTP status codeError codeError messageDescription
    400InvalidDBClusterId.MalformedThe specified parameter DBClusterId is not valid.The specified DBClusterId 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
    2022-06-01The Error code has changed. The response structure of the API has changedView Change Details
    2021-03-02The Error code has changed. The response structure of the API has changedView Change Details