Creating a Manual Backup
Function
This API is used to create a manual backup. Before calling this API:
- Learn how to authenticate this API.
URI
POST https://{Endpoint}/v3/{project_id}/backups
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Explanation: Project ID of a tenant in a region. To obtain the value, see Obtaining a Project ID. Restrictions: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
Request Parameters
| 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
POST https://gaussdb-opengauss.eu-west-101.myhuaweicloud.eu/v3/0483b6b16e954cb88930a360d2c4e663/backupslicy
{
"instance_id" : "7e01ac5ac5274957ba506f3851d11d51in14",
"name" : "backupwqwq3",
"description" : "manual backup"
} Response Parameters
| Parameter | Type | Description |
|---|---|---|
| backup | Object | Backup information. For details, see Table 4. |
| job_id | String | Task ID. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Backup ID. |
| name | String | Backup name, which must be unique. |
| description | String | Backup description. |
| begin_time | String | Backup start time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between calendar and hourly notation of time. Z indicates the time zone offset. |
| status | String | Backup status. Value:
|
| type | String | Backup type. Value: manual (manual full backup). |
| instance_id | String | DB instance ID. |
Example Response
{
"backup": {
"id": "e76112bfb2074871bf54cb8df5af7f64br14",
"name": "backupwqwq32",
"description": "manual 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
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.