Move out an OceanBase cluster

2025-04-16 07:40:56  Updated

Description

You can call this operation to move out an OceanBase cluster. If you directly call this operation, the cluster credentials will be lost. We recommend that you export the file of cluster credentials before you move out the OceanBase cluster.

Call description

Prerequisites

  • You have the permission to move out the specified OceanBase cluster.

    For more information about the permissions, see Overview.

  • You have passed the authentication for the OceanBase Cloud Platform (OCP) application service.

Request path

POST /api/v2/ob/clusters/{id}/moveOut

Request parameters

Path parameters

Parameter Type Required Example value Description
id Long Yes 1 The ID of the OceanBase cluster to be moved out.

Body parameters

Parameter Type Required Example value Description
deleteHost Boolean No true Specifies whether to delete all hosts in the cluster when the cluster is moved out.
deleteHostIds Array No [1,2] The IDs of the hosts to be deleted.
skipOperationHostIds Array No [1,2] The IDs of the hosts to be skipped in the operation. You can specify the IDs of abnormal hosts.
force Boolean No false Specifies whether to forcibly move out the cluster and delete its host metadata. Default value: false. This parameter is applicable only for OceanBase Cloud.
retainClusterInfo Boolean No false Specifies whether to retain information about the cluster to be moved out. If you set the value to true, OCP retains the cluster information for the use of the config server.
targetConfigAddress String No http://xxx.xxx.xxx.xxx:xxx The URL of the new config server that is specified for the cluster when you move out the cluster. The URL is in the http://xxx.xxx.xxx.xxx:xxx format.

Response parameters

Basic data structure

Parameter Type Description
data Object The information about the asynchronous task. For more information, see Task return structure.
successful Boolean Indicates whether the request was successful.
timestamp Datetime The timestamp when the server completed the request.
duration Integer The amount of time taken by the server to process the request, in milliseconds.
status Integer The HTTP status code.
traceId String The trace ID of the request. This trace ID is used for troubleshooting.
server String The address of the application server that responded to the request.

Examples

Sample request

POST /api/v2/ob/clusters/{id}/moveOut

{
  "deleteHost": true,
  "targetConfigAddress": "http://xxx.xxx.xxx.xxx:xxx"
}

Sample response

{
    "data": {
        "clusterId": 5000033,
        "creator": "admin",
        "executor": "xxx.xxx.xxx.xxx",
        "id": 13089033,
        "name": "Move out primary OB cluster",
        "operation": "EXECUTE",
        "prohibitRollback": false,
        "startTime": "2024-10-10T17:13:19.269+08:00",
        "status": "RUNNING",
        "subtasks": [
            {
                "description": "Delete cluster related info",
                "downstreams": [
                    13104453
                ],
                "id": 13104455,
                "name": "Delete cluster related info",
                "nodeType": "JAVA_TASK",
                "operation": "EXECUTE",
                "parallelIdx": -1,
                "prohibitRollback": false,
                "prohibitSkip": false,
                "runTime": 1,
                "seriesId": 1,
                "status": "PENDING",
                "timeout": 1800,
                "upstreams": [
                    13104454
                ]
            },
            {
                "description": "Prepare move out cluster",
                "downstreams": [
                    13104454
                ],
                "id": 13104458,
                "name": "Prepare move out cluster",
                "nodeType": "JAVA_TASK",
                "operation": "EXECUTE",
                "parallelIdx": -1,
                "prohibitRollback": false,
                "prohibitSkip": false,
                "runTime": 1,
                "seriesId": 2,
                "status": "PENDING",
                "timeout": 300,
                "upstreams": [
                    13104456
                ]
            },
            {
                "description": "Inactive agent modules",
                "downstreams": [
                    13104455
                ],
                "id": 13104454,
                "name": "Inactive agent modules",
                "nodeType": "JAVA_TASK",
                "operation": "EXECUTE",
                "parallelIdx": 0,
                "prohibitRollback": false,
                "prohibitSkip": false,
                "runTime": 1,
                "seriesId": 3,
                "status": "PENDING",
                "timeout": 3600,
                "upstreams": [
                    13104458
                ]
            },
            {
                "description": "Unreserve host",
                "downstreams": [
                    13104450
                ],
                "id": 13104451,
                "name": "Unreserve host",
                "nodeType": "JAVA_TASK",
                "operation": "EXECUTE",
                "parallelIdx": -1,
                "prohibitRollback": false,
                "prohibitSkip": false,
                "runTime": 1,
                "seriesId": 7,
                "status": "PENDING",
                "timeout": 1800,
                "upstreams": [
                    13104453
                ]
            },
            {

Contact Us