1
0
forked from docs/doc-exports
doc-exports/docs/opengauss/api-ref/opengauss_newapi_0024.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

19 KiB

Creating a Manual Backup

Function

This API is used to create a manual backup. Before calling this API:

URI

Request

  • Parameter description
    Table 2 Parameter description

    Parameter

    Mandatory

    Type

    Description

    instance_id

    Yes

    String

    DB instance ID.

    name

    Yes

    String

    Backup name. It must contain 4 to 64 characters and start with a letter. Only letters (case-sensitive), digits, hyphens (-), and underscores (_) are allowed.

    Minimum characters: 4

    Maximum characters: 64

    description

    No

    String

    Backup description. It contains up to 256 characters and cannot contain the following special characters: >!<"&'=

    Maximum characters: 256

Example Request

Creating a manual full backup for a DB instance

{
  "instance_id" : "7e01ac5ac5274957ba506f3851d11d51in14",
  "name" : "backupwqwq3",
  "description" : "manual backup"
}

Response

  • Normal response
    Table 3 Response body parameters

    Parameter

    Type

    Description

    backup

    Object

    Backup information.

    For details, see Table 4.

    job_id

    String

    Task ID.

    Table 4 backup field data structure description

    Parameter

    Type

    Description

    id

    String

    Backup ID.

    name

    String

    Backup name.

    description

    String

    Backup description.

    begin_time

    String

    Backup start time in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.

    status

    String

    Backup status. Value:

    • BUILDING: Backup in progress
    • COMPLETED: Backup completed
    • FAILED: Backup failed

    type

    String

    Backup type. Value: manual (manual full backup).

    instance_id

    String

    DB instance ID.

  • Example normal response
    {
        "backup": {
            "id": "e76112bfb2074871bf54cb8df5af7f64br14",
            "name": "backupwqwq32",
            "description": "mannual backup",
            "status": "BUILDING",
            "type": "manual",
            "begin_time": "2022-05-09T18:02:31+0800",
            "instance_id": "fd26e3bf26e5467587eec857e4f66ef0in14"
        },
        "job_id": "e4733090-b2c8-4ea7-a33a-f55f65723fb3"
    }

Status Code

Error Code

For details, see Error Codes.