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 Deployer

V3.2.1Community Edition

  • What is obd
  • Quick Start
    • Install obd
    • Quickly deploy OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment command
    • Cluster commands
    • Mirror and repository commands
    • Testing commands
    • Tool commands
    • obdiag commands
    • Binlog commands
    • Host commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Overview
    • Deploy through GUI
      • GUI operation overview
      • Mode configuration rules
      • Deploy an OceanBase cluster on the GUI
      • Deploy OCP through the GUI
      • Modify components on the GUI
      • Upgrade OCP on the GUI
    • Deploy through CLI
      • Configuration files
      • Deploy Component
        • Deploy OceanBase Database on a single OBServer node
        • Deploy OCP Express by using commands
        • Deploy and use obconfigserver
        • Deploy the obbinlog
        • Deploy oblogproxy by using the CLI
        • Deploy OCP by using commands
      • Manage Cluster
        • Physical Standby Database
          • Deploy primary and standby tenants by using obd
          • Switch the roles of tenants and decouple a standby tenant from the primary tenant
        • Scale out a cluster and change cluster components
        • Performance test
        • Cluster diagnotistics
        • Add GUI-based monitoring for an existing cluster
      • Takeover Cluster
        • Use OCP to take over a cluster deployed by obd
        • Use obd to take over a cluster
      • Upgrade Component
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OCP Express
      • Backup and restore
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • V3.2
      • OceanBase Deployer V3.2.2
      • OceanBase Deployer V3.2.1
      • OceanBase Deployer V3.2.0
    • V3.1
      • OceanBase Deployer V3.1.2
      • OceanBase Deployer V3.1.1
      • OceanBase Deployer V3.1.0
    • V3.0
      • OceanBase Deployer V3.0.1
      • OceanBase Deployer V3.0.0
    • V2.10
      • OceanBase Deployer V2.10.1
      • OceanBase Deployer V2.10.0
    • V2.9
      • OceanBase Deployer V2.9.2
      • OceanBase Deployer V2.9.1
      • OceanBase Deployer V2.9.0
    • V2.8
      • OceanBase Deployer V2.8.0
    • V2.7
      • OceanBase Deployer V2.7.0
    • V2.6
      • OceanBase Deployer V2.6.2
      • OceanBase Deployer V2.6.1
      • OceanBase Deployer V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployer V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployer V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployer V2.1.0
    • V2.0
      • OceanBase Deployer V2.0.1
      • OceanBase Deployer V2.0.0
    • V1.6
      • OceanBase Deployer V1.6.2
      • OceanBase Deployer V1.6.1
      • OceanBase Deployer V1.6.0
    • V1.5
      • OceanBase Deployer V1.5.0
    • V1.4
      • OceanBase Deployer V1.4.0
    • V1.3
      • OceanBase Deployer V1.3.3
      • OceanBase Deployer V1.3.2
      • OceanBase Deployer V1.3.0
    • V1.2
      • OceanBase Deployer V1.2.1
      • OceanBase Deployer V1.2.0

Download PDF

What is obd Install obd Quickly deploy OceanBase Database Quickly deploy OCP Quick deployment command Cluster commands Mirror and repository commands Testing commands Tool commands obdiag commands Binlog commands Host commands License commands Password commands Telemetry commands Overview GUI operation overview Mode configuration rules Deploy an OceanBase cluster on the GUI Deploy OCP through the GUI Modify components on the GUI Upgrade OCP on the GUI Configuration files Backup and restore Upgrade obd FAQ Error codes Version rules OceanBase Deployer V3.2.2 OceanBase Deployer V3.2.1 OceanBase Deployer V3.2.0 OceanBase Deployer V3.1.2 OceanBase Deployer V3.1.1 OceanBase Deployer V3.1.0 OceanBase Deployer V3.0.1 OceanBase Deployer V3.0.0 OceanBase Deployer V2.10.1 OceanBase Deployer V2.10.0 OceanBase Deployer V2.9.2 OceanBase Deployer V2.9.1 OceanBase Deployer V2.9.0 OceanBase Deployer V2.8.0 OceanBase Deployer V2.7.0 OceanBase Deployer V2.6.2 OceanBase Deployer V2.6.1 OceanBase Deployer V2.6.0 OceanBase Deployer V2.5.0 OceanBase Deployer V2.4.0 OceanBase Deployer V2.3.1 OceanBase Deployer V2.3.0 OceanBase Deployer V2.2.0 OceanBase Deployer V2.1.1 OceanBase Deployer V2.1.0 OceanBase Deployer V2.0.1 OceanBase Deployer V2.0.0 OceanBase Deployer V1.6.2 OceanBase Deployer V1.6.1 OceanBase Deployer V1.6.0 OceanBase Deployer V1.5.0 OceanBase Deployer V1.4.0 OceanBase Deployer V1.3.3 OceanBase Deployer V1.3.2 OceanBase Deployer V1.3.0 OceanBase Deployer V1.2.1 OceanBase Deployer V1.2.0
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 Deployer
  3. V3.2.1
iconOceanBase Deployer
V 3.2.1Community Edition
Community Edition
  • V 3.2.1
  • V 3.2.0
  • V 3.1.0
  • V 3.0.0
  • V 2.10.1
  • V 2.10.0
  • V 2.9.0
  • V 2.8.0
  • V 2.7.0
  • V 2.6.0
  • V 2.5.0
  • V 2.4.0
  • V 2.3.1
  • V 2.3.0
  • V 2.2.0
  • V 2.1.0
  • V 2.0.0
  • V 1.6.1

Backup and restore

Last Updated:2026-04-10 13:31:02  Updated
share
What is on this page
Prerequisites
Back up a tenant
Restore a tenant
References

folded

share

OceanBase Deployer (obd) allows you to back up and restore tenants by using commands since V3.2.0. This topic describes the tenant backup and restore procedures.

Note

  • To use obd commands for backup and restore, make sure that the cluster involved is managed by obd. Otherwise, obd cannot obtain the cluster information. By default, a cluster deployed by using obd is managed by obd. For a cluster not deployed by using obd, you first need to use obd to take over the cluster. For more information, see Use obd to take over a cluster.

  • For more information about obd commands used in this topic, see Cluster commands.

Prerequisites

Make sure that the following conditions are met:

  • You have installed obd V3.2.0 or later. We recommend that you install the latest version. For more information, see Install obd.

  • obshell has been installed in the cluster where the tenant to back up or restore resides and is running properly.

  • You have configured an appropriate backup destination.

Back up a tenant

This section describes how to back up the obmysql tenant in the test cluster. You need to modify related information based on the actual situation. We recommend that you use Alibaba Cloud Object Storage Service (OSS) as the backup destination.

Note

You cannot use backup commands to back up the sys tenant.

  1. Configure the backup information.

    OSS
    NFS
    AWS S3
    obd cluster tenant set-backup-config test obmysql -d 'oss://oceanbase-test-bucket/backup/data?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete' -a 'oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete'
    

    Here, oss:// indicates that OSS is used as the backup destination type, the bucket name is oceanbase-test-bucket, the storage paths in the bucket are /backup/data and /backup/log, and ? is used to separate other parameters of the path. The host parameter specifies the host address of the bucket. The access_id and access_key parameters specify the access key of the account to access OSS. The cleanup mode is set to delete.

    For more information about the parameters in data backup path, see SET DATA_BACKUP_DEST.

    obd cluster tenant set-backup-config test obmysql -d 'file:///data/nfs/backup/data' -a 'file:///data/nfs/backup/log'
    
    obd cluster tenant set-backup-config test obmysql -d 's3://oceanbase-test-bucket/backup/data?host=s3.<region>.amazonaws.com&access_id=****&access_key=****&s3_region=****&delete_mode=delete' -a 's3://oceanbase-test-bucket/backup/log?host=s3.<region>.amazonaws.com&access_id=****&access_key=****&s3_region=****&delete_mode=delete'
    

    Here, s3:// indicates that S3 is used as the backup destination type, the bucket name is oceanbase-test-bucket, the storage paths in the bucket are /backup/data and /backup/log, and ? is used to separate other parameters of the path. The host parameter specifies the domain name of S3. The access_id and access_key parameters specify the access key of the account to access S3. The s3_region parameter is required, and it specifies the region where the S3 bucket is located. The cleanup mode is set to delete.

    For more information about the parameters in data backup path, see SET DATA_BACKUP_DEST.

  2. Perform backup.

    Perform full backup
    Perform incremental backup
    obd cluster tenant backup test obmysql
    
    obd cluster tenant backup test obmysql -m incremental
    
  3. View the backup task.

    obd cluster tenant backup-show test obmysql
    

    Here is an example of viewing the backup task of the obmysql tenant in the test cluster. The OBServer node in this example is 10.10.10.1. You must modify the information based on the actual situation. The output is as follows, where the value of the task_status column is COMPLETED, indicating backup success.

    +---------------------------------------------------------------------------------------------------------+
    |                               backup task details of backup tenant obmysql                              |
    +-----------+----------------------------------+----------------------------------+-------------+---------+
    | tenant_id | start_timestamp                  | end_timestamp                    | task_status | comment |
    +-----------+----------------------------------+----------------------------------+-------------+---------+
    | 1002      | 2025-03-26T14:56:47.623096+08:00 | 2025-03-26T14:58:15.234362+08:00 | COMPLETED   | -       |
    +-----------+----------------------------------+----------------------------------+-------------+---------+
    
  4. (Optional) Cancel the backup task.

    obd cluster tenant backup-cancel test obmysql
    

    You can run this command to cancel a backup task not in the COMPLETED state. A few minutes after this command is executed, you can run the obd cluster tenant backup-show command to verify whether the backup task has been successfully canceled. The output is as follows, where the value of the task_status column is CANCELED, indicating that the backup task has been canceled.

    +--------------------------------------------------------------------------------------------------------------------+
    |                                    backup task details of backup tenant obmysql                                    |
    +-----------+----------------------------------+----------------------------------+-------------+--------------------+
    | tenant_id | start_timestamp                  | end_timestamp                    | task_status | comment            |
    +-----------+----------------------------------+----------------------------------+-------------+--------------------+
    | 1002      | 2025-03-26T15:15:49.728777+08:00 | 2025-03-26T15:16:18.547451+08:00 | CANCELED    | Operation canceled |
    +-----------+----------------------------------+----------------------------------+-------------+--------------------+
    

Restore a tenant

This section describes how to create the restore_1 tenant in the obtest cluster and restore the backup data to this tenant. You must modify the information based on the actual situation.

  1. Perform restore.

    OSS
    NFS
    AWS S3
    [root@ob-WB01191894-20250325105059 ~]# obd cluster tenant restore obtest restore_1 'oss://oceanbase-test-bucket/backup/data/?host=***.aliyun-inc.com&access_id=***&access_key=***' 'oss://oceanbase-test-bucket/backup/log/?host=***.aliyun-inc.com&access_id=***&access_key=***' --memory_size=2G --max_cpu=2
    

    You can use command options to configure resources available for the tenant to restore. If you do not specify the options, all remaining resources of the cluster are used to create the tenant. For more information, see the obd cluster tenant restore section in Cluster commands.

    [root@ob-WB01191894-20250325105059 ~]# obd cluster tenant restore obtest restore_1 'file:///data/nfs/backup/data' 'file:///data/nfs/backup/log' --memory_size=2G --max_cpu=2
    

    You can use command options to configure resources available for the tenant to restore. If you do not specify the options, all remaining resources of the cluster are used to create the tenant. For more information, see the obd cluster tenant restore section in Cluster commands.

    [root@ob-WB01191894-20250325105059 ~]# obd cluster tenant restore obtest restore_1 's3://oceanbase-test-bucket/backup/data?host=s3.<region>.amazonaws.com&access_id=****&access_key=****&s3_region=****' 's3://oceanbase-test-bucket/backup/log?host=s3.<region>.amazonaws.com&access_id=****&access_key=****&s3_region=****' --memory_size=2G --max_cpu=2
    

    You can use command options to configure resources available for the tenant to restore. If you do not specify the options, all remaining resources of the cluster are used to create the tenant. For more information, see the obd cluster tenant restore section in Cluster commands.

  2. View the restore task.

    obd cluster tenant restore-show obtest restore_1
    

    Here is an example of viewing the restore task of the restore_1 tenant in the obtest cluster. You must modify the information based on the actual situation. The output is as follows, where the value of the task_status column is SUCCESS, indicating restore success.

    +--------------------------------------------------------------------------------------------------------+
    |                            restore task details of restore tenant restore_1                            |
    +-----------+----------------------------------+---------------------------------+-------------+---------+
    | tenant_id | start_timestamp                  | end_timestamp                   | task_status | comment |
    +-----------+----------------------------------+---------------------------------+-------------+---------+
    | 1         | 2025-03-26T15:27:00.930773+08:00 | 2025-03-26T15:32:11.33193+08:00 | SUCCESS     | -       |
    +-----------+----------------------------------+---------------------------------+-------------+---------+
    
  3. View tenants in the cluster.

    obd cluster tenant show obtest
    

    The output is as follows:

    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                    tenant basic info                                                                                    |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | sys         | SYS         | MYSQL              | RANDOM       | 3.0     | 3.0     | 1G          | 9223372036854775807 | 9223372036854775807 | 2G            | 3           | PRIMARY     |
    | restore_1   | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 2G          | 9223372036854775807 | 9223372036854775807 | 6G            | 2           | PRIMARY     |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    
  4. (Optional) Cancel the restore task.

    You can run the following command to cancel the restore task of a tenant. Note that you can cancel only a restore task not in the SUCCESS state.

    obd cluster tenant restore-cancel obtest restore_1
    

    To verify whether the restore task has been successfully canceled, you can run the obd cluster tenant show or obd cluster tenant restore-show command. If the obtest tenant is not displayed in the output of the obd cluster tenant show command, or if an error indicating that the obtest tenant does not exist is returned for the obd cluster tenant restore-show command, the task has been successfully canceled.

References

  • For more information about the backup and restore feature of OceanBase Database, see Introduction to physical backup and restore.

  • For more information about the parameters in data backup path, see SET DATA_BACKUP_DEST.

Previous topic

Upgrade OCP Express
Last

Next topic

Upgrade obd
Next
What is on this page
Prerequisites
Back up a tenant
Restore a tenant
References