更新时间:2022-02-22 GMT+08:00

查询单个备份

功能介绍

根据指定ID查询单个备份。

URI

  • URI

    GET https://{endpoint}/v1/{project_id}/checkpoint_items/{checkpoint_item_id}

  • 参数说明
    表1 参数说明

    参数

    是否必选

    参数类型

    描述

    project_id

    String

    项目ID。

    获取方法请参见获取项目ID

    checkpoint_item_id

    String

    备份ID

请求

  • 要素说明

  • 请求样例
    GET https://{endpoint}/v1/{project_id}/checkpoint_items/{checkpoint_item_id}

响应

  • 要素说明
    表2 要素说明

    参数

    参数类型

    描述

    checkpoint_item

    checkpoint_item

    请参考表3

  • checkpoint_item 字段数据结构说明
    表3 checkpoint_item 字段数据结构说明

    参数

    参数类型

    描述

    checkpoint_id

    String

    备份记录ID

    created_at

    String

    创建时间,如:"2017-04-18T01:21:52.701973"

    extend_info

    Dict

    扩展信息

    id

    String

    备份ID

    name

    String

    备份名称

    resource_id

    String

    备份对象ID

    status

    String

    备份状态waiting_protect,protecting,available,waiting_restore,restoring,error,waiting_delete,deleting,deleted

    Enum:[ waiting_protect, protecting, available, waiting_restore, restoring, error, waiting_delete, deleting,deleted]

    updated_at

    String

    修改时间,如:"2017-04-18T01:21:52.701973"

    backup_data

    Dict

    虚拟机元数据

    description

    string

    备份描述信息

    resource_type

    String

    备份对象的类型

  • extend_info 字段数据结构说明
    表4 extend_info 字段数据结构说明

    参数

    参数类型

    描述

    auto_trigger

    Boolean

    是否自动触发

    average_speed

    Integer

    平均速率,单位为:kb/s

    copy_from

    String

    备份复制于那个region,默认为空

    copy_status

    String

    备份的复制状态,默认为na

    取值范围为:na, waiting_copy, copying, success, fail。

    fail_code

    fail_code

    错误码

    fail_op

    String

    失败的操作类型

    Enum: [backup, restore, delete]

    fail_reason

    String

    失败原因英文描述

    image_type

    String

    备份类型,如:backup

    incremental

    Boolean

    是否为增强备份

    progress

    Integer

    进度,整数,取值范围为:0-100

    resource_az

    String

    备份资源所属az

    resource_name

    String

    备份对象名称

    resource_type

    String

    备份对象的类型,如:"OS::Nova::Server"

    size

    Integer

    备份容量,以MB为单位

    space_saving_ratio

    Integer

    空间节省率

    volume_backups

    List<volume_backup>

    卷备份列表

    finished_at

    String

    备份完成时间,如:"2017-04-18T01:21:52.701973"

    supported_restore_mode

    String

    备份支持恢复的方式,当前取值包含na和backup。

    如果该字段取值为backup,备份支持通过云服务器上硬盘的备份进行恢复;

    如果该字段取值为na,备份不支持恢复。

    os_images_data

    List<image_data>

    镜像数据,虚拟机创建过镜像时有值

    support_lld

    Boolean

    是否支持lazyloading快速恢复

    app_consistency

    Dict

    应用一致性备份信息,请参考app_consistency字段结构说明

    taskid

    String

    任务ID

    hypervisor_type

    String

    虚拟化类型。

    取值为QEMU,表示虚拟机技术。

  • app_consistency字段结构说明

    参数

    参数类型

    描述

    app_consistency

    Integer

    是否做应用一致性备份;0代表不做应用一致性备份;1代表做应用一致性备份且应用一致性备份失败后,不继续做崩溃一致性备份;2代表做应用一致性备份且应用一致性备份失败后,继续做崩溃一致性备份。

    app_consistency_status

    Integer

    应用一致性备份冻结解冻操作是否成功;0表示未开启应用一致性备份;1表示开启了应用一致性,但未成功冻结和解冻IO;2表示开启了应用一致性,且成功冻结和解冻IO;11表示开启了应用一致性,但未成功冻结和解冻IO,Agent为老版本;12表示开启了应用一致性,且成功冻结和解冻IO,Agent为老版本。在普通备份失败的情况下,无论应用一致性冻结解冻操作是否成功,应用一致性备份均为失败。应用一致性备份特性参照创建资源备份接口描述。

    app_consistency_error_code

    String

    应用一致性备份失败错误码。

    app_consistency_error_message

    String

    应用一致性备份失败原因。

  • backup_data 字段数据结构说明
    表5 backup_data 字段数据结构说明

    参数

    参数类型

    描述

    __openstack_region_name

    String

    云服务器所在可用分区名称,为空时表示未获取到服务器该信息。

    cloudservicetype

    String

    云服务器类型。

    取值为server,表示服务器。

    disk

    Integer

    该云服务器规格对应要求系统盘大小

    imagetype

    String

    镜像类型gold:公共镜像private:私有镜像market:市场镜像

    Enum: [gold, private, market]

    ram

    Integer

    该云服务器的内存大小,单位为MB

    vcpus

    Integer

    该云服务器对应的cpu核数

    eip

    String

    云服务器弹性IP,为空时表示未获取到服务器该信息。

    private_ip

    String

    云服务器内部IP,为空时表示未获取到服务器该信息。

  • image_data字段数据结构说明

    参数

    参数类型

    描述

    image_id

    String

    镜像ID

  • fail_code 字段数据结构说明
    表6 fail_code 字段数据结构说明

    参数

    参数类型

    描述

    Code

    Long

    错误码

    Description

    String

    错误描述

  • volume_backup 字段数据结构说明
    表7 volume_backup 字段数据结构说明

    参数

    参数类型

    描述

    average_speed

    Integer

    平均速率,单位为MB/s。

    bootable

    Boolean

    是否系统盘。

    取值为True或者False。

    id

    String

    cinder backup id

    image_type

    String

    备份集类型,备份

    Enum:[ backup]

    incremental

    Boolean

    是否增备

    name

    String

    卷备份名称

    size

    Integer

    累计备份大小,单位是MB

    source_volume_id

    String

    源卷ID

    source_volume_size

    Integer

    源卷大小(GB)

    space_saving_ratio

    Integer

    空间节省率

    status

    String

    状态

    source_volume_name

    String

    源卷名称

  • 响应样例
    {
      "checkpoint_item": {
        "status": "available",
        "backup_data": {
          "eip": "",
          "cloudservicetype": "",
          "ram": 4096,
          "vcpus": 4,
          "__openstack_region_name": "",
          "private_ip": "",
          "disk": 0,
          "imagetype": ""
        },
        "name": "backup_d32c",
        "resource_id": "f45c477a-57e5-465f-999f-d845083962db",
        "created_at": "2017-04-15T04:20:37.277880",
        "checkpoint_id": "f672a1bb-6912-446a-816c-72792c5263e0",
        "updated_at": "2017-04-15T04:25:38.680638",
        "resource_type": "OS::Nova::Server",
        "extend_info": {
          "auto_trigger": false,
          "space_saving_ratio": 0,
          "copy_status": "na",
          "fail_reason": "",
          "resource_az": "az1.dc1",
          "image_type": "backup",
          "finished_at": "2017-04-15T04:25:38.675478",
          "average_speed": 0,
          "copy_from": "",
          "supported_restore_mode": "backup",
          "support_lld": false,
          "os_images_data": [
                {
                    "image_id": "fe84dd80-0229-4918-8d3d-cbb33154b565"
                }
            ],
          "volume_backups": [
            {
              "status": "available",
              "space_saving_ratio": 0,
              "name": "manualbk_47222",
              "bootable": true,
              "average_speed": 0,
              "source_volume_size": 20,
              "source_volume_id": "ee27f809-6fb5-40ae-ac46-c932bb4ee8fe",
              "incremental": false,
              "image_type": "backup",
              "source_volume_name": "karbor_02",
              "id": "70675cbc-d3a8-43a7-9f81-c8b6bc3f5d6d",
              "size": 0,
              "snapshot_id": "36f520e1-d2ea-4907-956a-3d9cd53e2d38"
            },
            {
              "status": "available",
              "space_saving_ratio": 0,
              "name": "manualbk_47222",
              "bootable": true,
              "average_speed": 0,
              "source_volume_size": 20,
              "source_volume_id": "e7f48980-927c-48de-afd4-f0245d2e5100",
              "incremental": false,
              "image_type": "backup",
              "source_volume_name": "karbor_01",
              "id": "8eb98e91-8924-4d4b-b6d6-28fb7b751e9c",
              "size": 0,
              "snapshot_id": "36f520e1-d2ea-4907-956a-3d9cd53e2d38"
            }
          ],
          "fail_code": {},
          "incremental": false,
          "taskid": "e0a21692-2192-11e7-bf23-0242ac110007",
          "hypervisor_type": "QEMU",
          "progress": 100,
          "fail_op": "",
          "resource_name": "karbor_02",
          "size": 0
        },
        "id": "90c1d5fa-1b9f-4aeb-b2f4-81c806e98190"
      }
    }

状态码

  • 正常

    状态码

    说明

    200

    OK

  • 异常

    状态码

    说明

    400

    请求参数不合法

    401

    鉴权失败

    403

    没有操作权限

    404

    请求对象不存在

    500

    服务不可用

错误码

请参考错误码