Updated on 2026-07-16 GMT+08:00

Querying an Automated Backup Policy

Function

This API is used to query an automated backup policy. Before calling this API:

Debugging

You can debug this API in API Explorer.

URI

GET /v3/{project_id}/instances/{instance_id}/backups/policy

Table 1 Parameter description

Name

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance. For details about how to obtain the instance ID, see Querying DB Instances.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

After a response is returned, the value of X-Subject-Token in the response header is the token.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language.

Constraints

N/A

Range

  • zh-cn: Chinese
  • en-us: English

Default Value

en-us

Response Parameters

Table 3 Parameter description

Parameter

Type

Description

backup_policy

Object

Definition

Backup policy information.

For details, see Table 4.

Table 4 backup_policy field data structure description

Parameter

Type

Description

keep_days

Integer

Definition

Full backup retention days.

Range

1–732

start_time

String

Definition

Full backup time window. Automated backups will be created during the backup time window.

Range

The value must be a valid value in the hh:mm-HH:MM format and contain 11 characters. The current time is the UTC time.

  • The HH value must be 1 greater than the hh value.
  • The values of mm and MM must be the same and must be set to 00.

period

String

Definition

Full backup period. Data will be automatically backed up on the selected days every week.

Range

1–7. The numbers are separated by commas (,), indicating the days of the week.

Example value:

  • 1,2,3,4 indicates that the backup period is Monday, Tuesday, Wednesday, and Thursday.
  • 1,2,3,4,5,6,7 indicates that an automated backup is performed every day from Monday to Sunday.
  • 1,3,5 indicates that an automated backup is performed on Monday, Wednesday, and Friday.

differential_priod

String

Definition

Differential backup period. An automated differential backup is performed at the specified interval (minutes). This field has been deprecated.

Range

N/A

differential_period

Integer

Definition

Differential backup period. An automated differential backup is performed at the specified interval (minutes).

Range

N/A

rate_limit

Integer

Definition

Bandwidth for backing up data (MB/s). The upload speed is related to the bandwidth.

Range

0–1024 MB/s. The value 0 indicates no limit.

prefetch_block

Integer

Definition

Number of prefetch pages from the modified pages in the disk table file during a differential backup. When modified pages are adjacent (for example, with a bulk data load), you can set this parameter to a large value. When modified pages are scattered (for example, random update), you can set this parameter to a small value.

Range

1–8192

filesplit_size

Integer

Definition

Size for splitting files. This field has been deprecated.

Range

N/A

file_split_size

Integer

Definition

Size by which full and differential backup files are split (GB).

Range

0–1024 GB

enable_standby_backup

Boolean

Definition

Whether to enable backup on a standby node.

Range

  • true: This function is enabled.
  • false: This function is disabled.

Example Request

Querying an automated backup policy

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/backups/policy

Example Response

Automated backup policy queried.

{
    "backup_policy": {
        "period": "1,2,3,4,5,6,7",
        "keep_days": 7,
        "start_time": "18:00-19:00",
        "differential_period": 30 ,
        "rate_limit": 75 ,
        "prefetch_block": 64 ,
        "file_split_size": 4 ,
        "enable_standby_backup" : false
    }
}

Status Codes

Error Codes

For details, see Error Codes.