1
0
forked from docs/doc-exports
doc-exports/docs/opengauss/api-ref/opengauss_newapi_0022.html
Ru, Li Yi d97aea4dd2 opengauss_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-09-06 09:04:21 +00:00

21 KiB

Querying an Automated Backup Policy

Function

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

URI

Request

None

Response

  • Normal response
    Table 2 Parameter description

    Parameter

    Type

    Description

    backup_policy

    Object

    Backup policy information.

    For details, see Table 3.

    Table 3 backup_policy field data structure description

    Parameter

    Type

    Description

    keep_days

    Integer

    Full backup retention days. Value: 1 to 732

    Minimum value: 1

    Maximum value: 732

    start_time

    String

    Full backup time window. The creation of an automated backup will be triggered during the backup time window. The value must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format.

    • 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

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

    The value is a number separated by commas (,), indicating the days of the week.

    differential_period

    Integer

    Differential backup period. An automated differential backup will be performed on the specified minutes.

    rate_limit

    Integer

    Upload speed at which data is uploaded to OBS. 0 MB/s indicates that the speed is not limited. The upload speed is related to the bandwidth.

    prefetch_block

    Integer

    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. The default value is 64.

    file_split_size

    Integer

    Size by which full and differential backup files are split, in GB. The value is from 0 to 1024, but it must be a multiple of 4. The default value is 4. 0 indicates the size is not limited.

    enable_standby_backup

    Boolean

    Whether to enable backup on a standby node.

    Value: true or false

    table_list

    Array

    Table-level backup information. For details, see Table 4.

    Table 4 table_list field data structure description

    Name

    Type

    Description

    db_name

    String

    Database name.

    schema_name

    String

    Schema name.

    table_name

    String

    Table name.

  • Example normal response

    Querying an automated backup policy

    {
        "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,
            "table_list" : [ { 
                 "db_name" : "table_backup_db", 
                 "schema_name" : "myschema", 
                 "table_name" : "table_test_1685587714722" 
             } ] 
        }
    }

Status Code

Error Code

For details, see Error Codes.