创建备份还原点
功能介绍
对存储库执行备份,生成备份还原点
URI
POST /v3/{project_id}/checkpoints
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
checkpoint |
是 |
VaultBackup object |
Parameters for backing up the vault |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
parameters |
否 |
CheckpointParam object |
Parameters |
|
vault_id |
是 |
String |
Vault ID |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
auto_trigger |
否 |
Boolean |
Whether automatic triggering is enabled. Possible values are true (yes) and false (no). 缺省值:false |
|
description |
否 |
String |
Backup description 最小长度:0 最大长度:255 |
|
incremental |
否 |
Boolean |
Whether the backup is an incremental backup. Possible values are true (yes) and false (no). 缺省值:true |
|
name |
否 |
String |
Backup name, which can contain only digits, letters, underscores (_), and hyphens (-) 最小长度:1 最大长度:64 |
|
resources |
否 |
Array of strings |
UUID list of resources to be backed up |
|
resource_details |
否 |
Array of Resource objects |
Resource details 数组长度:0 - 256 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
id |
是 |
String |
ID of the resource to be backed up |
|
name |
否 |
String |
Name of the resource to be backed up. The value consists of 0 to 255 characters. 最小长度:0 最大长度:255 |
|
type |
是 |
String |
Type of the resource to be backed up, which can be OS::Nova::Server, OS::Cinder::Volume, OS::Ironic::BareMetalServer, or OS::Sfs::Turbo |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
checkpoint |
CheckpointCreate object |
Restore point information |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
created_at |
String |
Creation time, for example, 2020-02-05T10:38:34.209782 |
|
id |
String |
Restore point ID |
|
project_id |
String |
Project ID |
|
status |
String |
Status 枚举值:
|
|
vault |
CheckpointPlanCreate object |
Vault information |
|
extra_info |
CheckpointExtraInfoResp object |
Extended information |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
id |
String |
Vault ID |
|
name |
String |
Vault name |
|
resources |
Array of CheckpointResourceResp objects |
Backup objects |
|
skipped_resources |
Array of CheckpointCreateSkippedResource objects |
Resources skipped during backup |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
extra_info |
String |
Extra information of the resource |
|
id |
String |
ID of the resource to be backed up |
|
name |
String |
Name of the resource to be backed up |
|
protect_status |
String |
Protected status 枚举值:
|
|
resource_size |
String |
Allocated capacity for the associated resource, in GB |
|
type |
String |
Type of the resource to be backed up, which can be OS::Nova::Server, OS::Cinder::Volume, OS::Ironic::BareMetalServer, or OS::Sfs::Turbo |
|
backup_size |
String |
Backup size |
|
backup_count |
String |
Number of backups |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
id |
String |
Resource ID |
|
type |
String |
Resource type |
|
name |
String |
Resource name |
|
code |
String |
For details, see Error Codes. |
|
reason |
String |
Reason for the skipping. For example, the resource is being backed up. |
请求示例
执行存储库资源自动备份,生成备份还原点。
POST https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/checkpoints
{
"checkpoint" : {
"parameters" : {
"auto_trigger" : true,
"description" : "backup_description",
"incremental" : true,
"name" : "backup_name",
"resources" : [ "94eba8b2-acc9-4d82-badc-127144cc5526" ]
},
"vault_id" : "3b5816b5-f29c-4172-9d9a-76c719a659ce"
}
}
响应示例
状态码: 200
OK
{
"checkpoint" : {
"status" : "protecting",
"created_at" : "2019-05-10T07:59:12.733+00:00",
"vault" : {
"skipped_resources" : [ ],
"id" : "3b5816b5-f29c-4172-9d9a-76c719a659ce",
"resources" : [ {
"name" : "ecs-1f0f-0002",
"resource_size" : 40,
"protect_status" : "available",
"type" : "OS::Nova::Server",
"id" : "94eba8b2-acc9-4d82-badc-127144cc5526"
} ],
"name" : "vault-be94"
},
"project_id" : "4229d7a45436489f8c3dc2b1d35d4987",
"id" : "8b0851a8-adf3-4f4c-a914-dead08bf9664",
"extra_info" : {
"retention_duration" : -1,
"name" : "backup_name",
"description" : "backup_description"
}
}
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
错误码
请参见错误码。