Executing a Replication Policy

Function

This API is used to select a backup policy to create replicas for backups that are generated according to the backup policy and that have not been replicated.

URI

  • URI format

    POST https://{endpoint}/v1/{project_id}/providers/{provider_id}/checkpoints/replicate

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID

    For details about how to obtain the project ID, see Obtaining a Project ID.

    provider_id

    Yes

    String

    Backup provider ID, which specifies whether the backup object is a server or disk. This parameter has a fixed value. For CSBS, the value is fc4d5750-22e7-4798-8a46-f48f62c4c1da.

Request

  • Element description

    Parameter

    Mandatory

    Type

    Description

    replication

    Yes

    replication_param

    Replication parameter

  • Parameter description of field replication_param

    Parameter

    Mandatory

    Type

    Description

    policy_id

    Yes

    String

    Backup policy ID

    auto_trigger

    No

    Boolean

    Whether to automatically trigger replication this time. The default value is false, which indicates the replication needs to be manually triggered.

    destination_region

    Yes

    String

    Destination region of the replication, which can be obtained by calling the API of Querying the Replication Capability.

    destination_project_id

    Yes

    String

    ID of the replication destination project

    enable_acceleration

    No

    Boolean

    Whether to enable the acceleration function to shorten the time spent on cross-region replication. For details about acceleration fees, visit the official website.

  • Example request
    POST https://{endpoint}/v1/{project_id}/providers/{provider_id}/checkpoints/replicate
    {
      "replication" : {
        "policy_id": "d4acdab5-6d4d-42d8-8c56-ae94e53bfe87",
        "auto_trigger" : false,
        "destination_region": "cn-east-2",
        "destination_project_id": "e0b97bac-532c-4c51-96fa-4b3a32253be4"
      }
    }

Response

  • Element description

    Parameter

    Type

    Description

    replication

    replication_resp

    Replication response parameter

  • Parameter description of field replication_resp

    Parameter

    Type

    Description

    project_id

    String

    Project ID

    provider_id

    String

    Backup provider ID, which specifies whether the backup object is a server or disk. This parameter has a fixed value. For CSBS, the value is fc4d5750-22e7-4798-8a46-f48f62c4c1da.

    policy_id

    String

    Backup policy ID

    source_region

    String

    Replication source region

    destination_region

    String

    ID of the replication destination region

    destination_project_id

    String

    ID of the replication destination project

    checkpoint_items

    List<checkpointitem_resp>

    List of backups to be replicated

  • Parameter description of field checkpointitem_resp

    Parameter

    Type

    Description

    checkpoint_item_id

    String

    ID of the source backup used for replication

    replication_record_id

    String

    Replication record ID

  • Example response
    {
      "replication" :{
          "project_id": "4800fde9-66f8-4458-b805-4c01066b9568",
          "provider_id": "fc4d5750-22e7-4798-8a46-f48f62c4c1da",
          "policy_id": "d4acdab5-6d4d-42d8-8c56-ae94e53bfe87",
          "source_region": "cn-north-1",
          "destination_region": "cn-east-2",
          "destination_project_id": "e0b97bac-532c-4c51-96fa-4b3a32253be4",
          "checkpoint_items": [
            {"checkpoint_item_id": "c4dfa74c-7e60-4361-86b9-9a3250115ed6",
             "replication_record_id": "6f55d79b-9f01-4d3d-b4fb-a63e3070ea12"},
            {"checkpoint_item_id": "0eaf4230-854e-41ea-bf0c-392d4c26c8b5",
             "replication_record_id": "5d850404-bc98-45b2-9f0b-6ff2f77d2b6b"}] 
      } 
    }

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.