OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Cloud Platform

V4.3.2

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Cloud Platform
    3. V4.3.2
    iconOceanBase Cloud Platform
    V 4.3.2
    • V 4.3.6
    • V 4.3.5
    • V 4.3.4
    • V 4.3.3
    • V 4.3.2
    • V 4.3.1
    • V 4.3.0
    • V 4.2.2
    • V 4.0.0 and earlier

    Create a backup strategy for a cluster

    Last Updated:2026-04-20 07:26:00  Updated
    share
    What is on this page
    Description
    Call description
    Prerequisites
    Request path
    Request parameters
    Response parameters
    Examples
    Sample request
    Sample response

    folded

    share

    Description

    You can call this operation to create a backup strategy for a cluster, set the cycle, time, and storage address for backup scheduling, and set the expired data cleanup and alert thresholds.

    Call description

    Prerequisites

    • You have the Create permission on cluster backup and recovery.

    • You have passed the authentication for the OCP application service.

    Request path

    POST /api/v2/ob/clusters/{id}/backup/config/backupStrategy

    path:

    Parameter Type Required Example value Description
    id Integer Yes 1 The ID of the cluster for which you want to create a backup strategy.

    Request parameters

    Parameter Type Required Example value Description
    backupMode String Yes LOGICAL_BACKUP The backup mode. Valid values: * LOGICAL_BACKUP * PHYSICAL_BACKUP
    obBackupScheduleConfig Object Yes N/A The backup scheduling configuration. For more information, see Data structure of obBackupScheduleConfig .
    obBackupThresholdConfig Object Yes N/A The threshold for backup alerts. For more information, see Data structure of obBackupThresholdConfig .
    obBackupServiceStorageConfig Object Yes N/A The backup storage configuration. For more information, see Data structure of obBackupServiceStorageConfig .
    secondaryBackupEnabled Boolean No False Specifies whether to enable secondary backup. Default value: false. Only OceanBase Database V2.2.77 and later support secondary backup.
    obSecondaryBackupConfig Object No N/A The secondary backup configuration. For more information, see Data structure of obSecondaryBackupConfig .

    Data structure of obBackupScheduleConfig

    Parameter Type Required Description
    backupScheduleMode String Yes The backup scheduling cycle. Valid values: WEEK and MONTH.
    backupScheduleEnabled Boolean Yes Specifies whether to enable backup.
    backupScheduleTime OffsetTime Yes The scheduled backup time, for example, "02:00:00.000+08:00".
    dayAndDataBackupModelMap Map Yes The backup schedule and data backup method, for example, { "2": "FULL_BACKUP", "4": "FULL_BACKUP", "6": "INCREMENTAL_BACKUP" } The settings specify full data backup on Tuesday and Thursday and incremental data backup on Saturday.
    startLogBackup Boolean Yes Specifies whether to start log backup at the same time. This parameter is generally set to true.
    cleanEnabled Boolean No Specifies whether to enable expired data cleanup.
    backupDataRetentionDays Long No The number of days for backup data retention. If you set it to 7, the system retains data of the last seven days. This parameter is valid only when cleanEnabled is set to true.
    cleanScheduleTime OffsetTime No The scheduled time to delete expired data.

    Data structure of obBackupThresholdConfig

    Parameter Type Required Description
    dataBackupTimeoutMinutes Long Yes The timeout period for data backup, in minutes.
    noSuccessfulDataBackupAlarmDays Long Yes The consecutive number of days exceeding which an alert for no successful backup tasks is triggered.
    libObLogExpireDays Long No The number of days for retaining liboblog. This parameter is valid only for logical backup.
    logBackupDelaySeconds Long Yes The log backup delay threshold, in seconds.

    Data structure of obBackupServiceStorageConfig

    Parameter Type Required Description
    configName String Yes The name of the storage configuration.
    obBackupStorageBaseInfo Object Yes The basic parameters of the storage configuration.
    |--backupStorageType String Yes The storage type. Valid values: BACKUP_STORAGE_FILE, BACKUP_STORAGE_OSS, and BACKUP_STORAGE_COS.
    |--storageUrl String Yes The storage directory. Specify a directory without any protocol name, for example, /obbackup/ or osstest/backup.
    |--ossAccessKey Object No The OSS information. This parameter is valid only when backupStorageType is set to BACKUP_STORAGE_OSS.
    |--endpoint String Yes The access domain name.
    |--accessKeyId String Yes The AccessKey ID.
    |--accessKeySecret String Yes The AccessKey secret.
    |--cosAccessKey Object No The COS information. This parameter is valid only when backupStorageType is set to BACKUP_STORAGE_COS.
    |--endpoint String Yes The access domain name.
    |--accessKeyId String Yes The AccessKey ID.
    |--accessKeySecret String Yes The AccessKey secret.
    |--appId String Yes The ID of the application.
    |--alarmStoragePercentageThreshold Long Yes The threshold for backup storage capacity alerts. Set this parameter to a percentage value.
    storageId Long No The ID of the storage configuration.
    serviceType String No The service type. Valid values: BACKUP_RESTORE_SERVICE (for logical backup recovery), OB_CLUSTER (for physical backup recovery), and OTHERS.
    serviceId Long No The ID of the service. * If the service type is BACKUP_RESTORE_SERVICE, this parameter indicates the backup and recovery service ID. * If the service type is OB_CLUSTER, this parameter indicates the cluster ID.
    serviceName String No The name of the service. * If the service type is BACKUP_RESTORE_SERVICE, this parameter indicates the name of the backup and recovery service. * If the service type is OB_CLUSTER, this parameter indicates the cluster name.
    hostIdList Array No The list of host IDs for global data recovery. * If the service type is BACKUP_RESTORE_SERVICE, this parameter indicates the list of the backup and recovery host IDs. * If the service type is OB_CLUSTER, this parameter indicates the list of host IDs in the cluster.

    Data structure of obSecondaryBackupConfig

    Parameter Type Required Description
    scheduleConfig Object Yes The secondary backup scheduling configuration.
    |--dataBackupScheduleEnabled Boolean Yes Specifies whether to enable secondary data backup.
    |--logBackupScheduleEnabled Boolean Yes Specifies whether to enable secondary log backup.
    |--logSecondaryBackupPeriod String Yes The scheduling cycle for secondary log backup. Currently, only ONCE_A_DAY is supported.
    storageConfig Object Yes The storage configuration. For more information, see Data structure of obBackupServiceStorageConfig .

    Response parameters

    Parameter Type Description
    data Object The common response parameters for backup objects. For more information, see Data structure of BackupCommonResponse .
    successful Boolean Indicates whether the request was successful.
    timestamp Datetime The timestamp when the server completed the request.
    duration Integer The time taken by the server to process the request, in milliseconds.
    status Integer An 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.

    Data structure of BackupCommonResponse

    Parameter Type Description
    obBackupTaskType String The backup operation type, for example, CREATE_BACKUP_STRATEGY.
    backupObjectOpsResultList Array The operation result set of the backup object.
    |--obBackupObjectList Array The list of information returned for the backup object.
    |--clusterId Long The ID of the cluster.
    |--tenantId Long The ID of the tenant.
    |--backupDimension String The backup dimension. Valid values: * CLUSTER * TENANT CLUSTER represents cluster backup and TENANT represents tenant backup. Tenant backup is not supported.
    |--beSuccessful Boolean Indicates whether the operation was successful.
    |--taskIdList Array The list of task numbers returned for asynchronous tasks.
    |--errorCode Object The error code.
    |--hint String The prompt information.

    Examples

    Sample request

    {
        "backupMode": "PHYSICAL_BACKUP",
        "obSecondaryBackupConfig": {
            "storageConfig": {
                "configName": "nfs0907_1451",
                "obBackupStorageBaseInfo": {
                    "backupStorageType": "BACKUP_STORAGE_FILE",
                    "storageUrl": "/obbackup/backup_backup"
                },
                "alarmStoragePercentageThreshold": 80
            },
            "scheduleConfig": {
                "logSecondaryBackupPeriod": "ONCE_AN_HOUR",
                "logBackupScheduleEnabled": true,
                "dataBackupScheduleEnabled":true
            }
        },
        "obBackupThresholdConfig": {
            "dataBackupTimeoutMinutes": 7,
            "logBackupDelaySeconds": 300,
            "noSuccessfulDataBackupAlarmDays": 2
        },
        "secondaryBackupEnabled": true,
        "obBackupObjectList": [
            {
                "clusterId": 1000005,
                "backupDimension": "CLUSTER"
            }
        ],
        "obBackupScheduleConfig": {
            "dayAndDataBackupModelMap": {
                "2": "FULL_BACKUP",
                "4": "FULL_BACKUP",
                "6": "FULL_BACKUP"
            },
            "startLogBackup": true,
            "backupScheduleMode": "WEEK",
            "backupScheduleTime": "02:00:00.000+08:00"
        },
        "obBackupServiceStorageConfig": {
            "configName": "nfs0907_1452",
            "obBackupStorageBaseInfo": {
                "backupStorageType": "BACKUP_STORAGE_FILE",
                "storageUrl": "/obbackup/"
            },
            "alarmStoragePercentageThreshold": 80
        }
    }
    

    Sample response

    {
        "data": {
            "backupObjectOpsResultList": [
                {
                    "beSuccessful": true,
                    "obBackupObjectList": [
                        {
                            "backupDimension": "CLUSTER",
                            "clusterId": 1000005
                        }
                    ],
                    "taskIdList": [
                        3000041
                    ]
                }
            ],
            "obBackupTaskType": "CREATE_BACKUP_STRATEGY"
        },
        "duration": 51,
        "server": "a83ad33525",
        "status": 200,
        "successful": true,
        "timestamp": "2021-09-07T14:51:41.135+08:00",
        "traceId": "5962f337662d4043"
    }
    

    Previous topic

    Query backup capabilities of a cluster
    Last

    Next topic

    Modify the backup strategy of a cluster
    Next
    What is on this page
    Description
    Call description
    Prerequisites
    Request path
    Request parameters
    Response parameters
    Examples
    Sample request
    Sample response