• Cloud Server Backup Service

csbs
  1. Help Center
  2. Cloud Server Backup Service
  3. API Reference
  4. API Description
  5. Backup Management
  6. Executing a Backup Policy

Executing a Backup Policy

Function

This API is used to manually execute a backup policy and create a backup task.

URI

  • URI format

    POST /v1/{project_id}/providers/{provider_id}/checkpoints

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID

    provider_id

    Yes

    String

    Backup provider ID, currently fixed at fc4d5750-22e7-4798-8a46-f48f62c4c1da

Request

  • Element description

    Parameter

    Mandatory

    Type

    Description

    checkpoint

    Yes

    checkpoint_req

    -

  • Parameter description of field checkpoint_req

    Parameter

    Mandatory

    Type

    Description

    parameters

    Yes

    checkpoint_param

    Backup parameters

    plan_id

    Yes

    String

    Backup policy ID. Refer to the backup policy ID that is returned by the API of "Querying the Backup Policy List."

  • Parameter description of field checkpoint_param

    Parameter

    Mandatory

    Type

    Description

    auto_trigger

    No

    Boolean

    Whether automatic trigger is enabled

    resources

    No

    List<String>

    ID list of resources to be backed up

  • Example request
    POST /v1/{project_id}/providers/{provider_id}/checkpoints
    {
      "checkpoint" : {
        "plan_id" : "62171999-3df1-42f7-9513-6f9b1bea4744",
        "parameters" : {
          "auto_trigger" : false,
          "resources" : [ "7a32a8b5-7977-4e24-b5da-e0eb457db75b", "b2b433bf-7dd6-4a74-aa8f-85673dfbda48" ]
        }
      }
    }

Response

  • Element description

    Parameter

    Type

    Description

    checkpoint

    checkpoint_resp

    -

  • Parameter description of field checkpoint_resp

    Parameter

    Type

    Description

    status

    String

    Status

    created_at

    String

    Creation time

    id

    String

    Backup record ID

    resource_graph

    String

    Resource graph

    project_id

    String

    Project ID

    protection_plan

    plan_resp

    Backup policy information

    extra_info

    String

    Additional information about the backup object

  • Parameter description of field plan_resp

    Parameter

    Type

    Description

    id

    String

    Backup policy ID

    name

    String

    Backup policy name

    resources

    List<resource>

    Backup object list

  • Parameter description of field resource

    Parameter

    Type

    Description

    id

    String

    ID of the object to be backed up

    type

    String

    Entity object type of the backup object. If the type is VMs, the value is OS::Nova::Server.

    name

    String

    Backup object name

    extra_info

    String

    Additional information of the resource

  • Example response
    {
      "checkpoint" : {
        "status" : "protecting",
        "created_at" : "2016-12-06T21:20:29.898823",
        "id" : "14626f11-b54a-44ea-8e69-7463e527506a",
        "resource_graph" : null,
        "project_id" : "b942cc8342734d15bcb246babb1953cf",
        "protection_plan" : {
          "id" : "6a6cda7e-7b89-4b14-8e5c-3b6821a97d2c",
          "resources" : [ {
            "type" : "OS::Nova::Server",
            "id" : "1c960fe4-e679-421a-97cd-4f7463d2344b",
            "name" : "server0",
            "extra_info": "{}"
          } ],
          "name" : "backup"
        }
        "extra_info": "{"created_by": "manual"}"
      }
    }

Status Codes

  • Normal

    Status Code

    Description

    200

    OK

  • Abnormal

    Status Code

    Description

    400

    Invalid request parameters.

    401

    Authentication failed.

    403

    No operation permission.

    404

    Requested object not found.

    500

    Service internal error.

    503

    Service unavailable.

Error Codes

For details, see Error Codes.