OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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 Database

SQL - V4.4.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 & CertificationTicket
    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 Database
    3. SQL
    4. V4.4.2
    iconOceanBase Database
    SQL - V 4.4.2
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Set the backup configuration for a tenant

    Last Updated:2026-04-02 06:23:57  Updated
    Share
    What is on this page
    Request parameters
    Response parameters
    Examples
    Request example
    Response example
    References

    folded

    Share

    This topic describes how to set the backup configuration for a tenant through an API.

    Request parameters

    Parameter
    Type
    Required
    Example value
    Description
    data_base_uri string Yes "file:///data/backup/data" The path for storing data backup files. After the configuration is set, data backup files will be stored in this path.
    archive_base_uri string Yes "file:///data/backup/clog" The path for storing log archive files. After the configuration is set, log archive files will be stored in this path.
    log_archive_concurrency int No 0 The total number of work threads for log archiving. The default value is 0, and the valid range is [0, 100].
    binding string No "optional" The priority mode for archiving and business. Valid values include optional (business takes priority) and mandatory (archiving takes priority). The default value is Optional.
    ha_low_thread_score int No 0 The number of current work threads for high availability tasks such as backup and backup cleanup. You can increase this value before you start a backup. We recommend that you double the value each time. The default value is 0, and the valid range is [0, 100].
    piece_switch_interval string No 1d The switching cycle for pieces. If this parameter is not specified, the default value is 1d, and the valid range is [1d, 7d].
    archive_lag_target string No 7200s The maximum allowed latency for log archiving. The default value is 2 minutes, which indicates the maximum allowed interval between two consecutive I/Os for log archiving. The valid range is [0ms, 7200s].
    delete_policy DeletePolicy No {
    "delete_policy": "{
    "policy": "default",
    "recovery_window": "7d",
    },
    }
    You can set a cleanup strategy for a tenant after a backup is successful. A tenant with a cleanup strategy will trigger an automatic cleanup every hour to clean up expired backups. The following table describes the parameters in the configuration:
    • policy: the strategy name. The value is default at present.
    • recovery_window: the window time. It indicates the period from the current time during which data can be restored.

    Response parameters

    Parameter
    Type
    Description
    successful bool Indicates whether the request was successful.
    timestamp time.Time The timestamp when the request is completed on the server.
    duration int The time (in milliseconds) taken by the server to process the request.
    status int The HTTP status code.
    traceId string The Trace ID of the request.
    data DagDetailDTO The asynchronous task information. For more information, see the Data structure of DagDetailDTO section.
    error ApiError The error information returned by the request, which contains the following information:
    • code: the error code.
    • message: the error message.
    • subErrors: the sub-error information.

    The data structure of DagDetailDTO is described as follows:

    Parameter
    Type
    Description
    id string The common ID of the DAG.
    dag_id int The ID of the DAG, which is the primary key in OceanBase Database.
    name string The name of the DAG.
    stage int The current execution stage of the DAG.
    max_stage int The total number of stages in the execution process of the DAG.
    state string The execution status of the DAG.
    operator string The type of the execution operation of the DAG.
    start_time time.Time The start time of the execution of the DAG.
    end_time time.Time The end time of the execution of the DAG.
    additional_data map[string]any Other data of the DAG.
    nodes []NodeDetailDTO Information about all nodes in the DAG. For more information, see Get node details.

    Examples

    Request example

    POST 10.10.10.1:2886/api/v1/tenant/t1/backup/config

    {
      "data_base_uri":"file:///data/backup/tenant/data",
      "archive_base_uri":"file:///data/backup/tenant/archive",
      "log_archive_concurrency":100,
      "binding":"Mandatory",
      "ha_low_thread_score":35,
      "piece_switch_interval":"6d",
      "archive_lag_target":"2h",
      "delete_policy":
      {
        "policy":"",
        "recovery_window":"5d"
      }
    }
    

    Response example

    {
      "successful": true,
      "timestamp": "2024-01-09T17:11:43.385889278+08:00",
      "duration": 1,
      "status": 200,
      "traceId": "877fe32b83634153",
      "data": {
        "id": "22130706433028869",
        "dag_id": 4,
        "name": "Set obcluster backup config for t1",
        "stage": 1,
        "max_stage": 2,
        "state": "READY",
        "operator": "RUN",
        "start_time": "2024-01-09T17:11:43.384630643+08:00",
        "end_time": "2024-01-09T17:11:43.384630643+08:00",
        "additional_data": null,
        "nodes": null
      }
    }
    

    References

    You can also call the API through SDK methods.

    • For more information about how to call the API through obshell-sdk-python, see Set the backup configuration for a tenant.

    • For more information about how to call the API through obshell-sdk-go, see Set the backup configuration for a tenant.

    Previous topic

    Fuzzy query tenant parameters
    Last

    Next topic

    Set cluster-level backup configurations
    Next
    What is on this page
    Request parameters
    Response parameters
    Examples
    Request example
    Response example
    References