doc-exports/docs/opengauss/api-ref/opengauss_api_0026.html
Wang , Deng Ke a96a12ecf1 openGauss API 20221109 version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2022-11-14 16:40:26 +00:00

14 KiB

Setting an Automated Backup Policy

Function

This API is used to set an automated backup policy.

URI

Request

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    backup_policy

    Yes

    Object

    Specifies the backup policy information.

    For details, see Table 3.

    Table 3 backup_policy field data structure description

    Name

    Mandatory

    Type

    Description

    keep_days

    Yes

    Integer

    Specifies the backup retention days.

    The value ranges from 1 to 732.

    start_time

    Yes

    String

    Specifies the backup time window. Automated backups will be triggered during the backup time window.

    The value cannot be empty. It must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format.

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

    Example value:

    21:00-22:00

    period

    Yes

    String

    Specifies the full backup period. An automated full backup will be performed on the specified days of the week.

    The value is a number separated by commas (,), indicating the days of the week. For example, 1,2,3,4 indicates that the backup period is Monday, Tuesday, Wednesday, and Thursday.

    differential_period

    Yes

    String

    Specifies the interval for automated differential backups.

    The value is 15, 30, 60, 180, 360, 720, or 1440 in minute.

    Example value: 30

  • Example request
    {
    	"backup_policy": {
    		"keep_days": 7,
    		"start_time": "19:00-20:00",
    		"period": "1,2,3,4,5",
    		"differential_period": "30"
    	}
    }

Response

  • Normal response

    None

  • Example normal response

    {}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.