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.3.5

    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.3.5
    iconOceanBase Database
    SQL - V 4.3.5
    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

    Backup commands in obshell

    Last Updated:2026-04-09 08:28:54  Updated
    share
    What is on this page
    obshell backup set-config
    obshell backup show
    obshell tenant backup
    obshell backup show

    folded

    share

    This topic describes the backup commands in obshell. You can use these commands to set backup configurations and view backup tasks. Make sure that the OceanBase cluster has been initialized. You can run the command with the -h or --help option to get help information.

    obshell backup set-config

    You can run this command to configure backup-related parameters for all tenants or a specified tenant.

    ${home_path}/bin/obshell backup set-config [flags]
    
    # example
    /home/admin/oceanbase/bin/obshell backup set-config -t tenant1 -d /path/to/backup/data -a /path/to/backup/archive
    

    home_path is the installation directory of OceanBase Database. By default, obshell is located in the bin directory of the installation directory of OceanBase Database.

    The following table describes the options:

    Option name
    Required
    Data type
    Default value
    Description
    -t/--tenant_name N string No The name of the tenant to back up configurations for. If not specified, configurations for all tenants in the cluster are backed up.
    -d/--data_backup_uri No string N/A Sets the destination for tenant data backups. If a backup destination has been set before, this option will adopt the previous setting if left unconfigured. If no backup destination has been set before, leaving this option unconfigured will result in a default empty value.

    Note

    This option only takes effect when -t/--tenant_name is specified.

    -a/--archive_log_uri No string N/A Sets the destination directory for the tenant logs. If you have specified a destination directory in the preceding step and do not specify a destination directory here, the previous directory is used. If you have not specified a destination directory in the preceding step, a default value is used here.

    Note

    The option takes effect only if you specify the -t/--tenant_name option.

    -u/--backup_base_uri No string None The backup destination for all tenants. After you configure this option, the data backup and log archive paths for each tenant are appended to the specified directory under

    Note

    This option takes effect only when you do not specify -t/--tenant_name>

    . If both options are specified, an error is returned.

    -c/--log_archive_concurrency No int n/a The total number of worker threads for log archiving.
    -b/--binding No string Optional The value must be Optional (user business takes priority) or Mandatory (archiving takes priority). If you do not specify this parameter, the system default is Optional.
    -i/--piece_switch_interval No string None The interval for switching pieces. Value range: [1d, 7d].
    -l/--archive_lag_target No string N/A Specifies the lag in tenant log archiving. Make sure that the log archiving destination is properly configured before you modify this parameter.
    -D/--delete_policy No string default Specifies the data clean-up strategy. A tenant with a specified clean-up strategy will trigger automatic clean-up every hour. At present, only the value default is supported, indicating that the scope of automatic clean-up is limited to the backups of -d/--data_backup_uri and -a/--archive_log_uri.
    -r/--delete_recovery_window false string none specifies the time window for restoring backed-up data. The value must contain a time unit. For more information, see Parameters of backup cleanup.
    -s/--ha_low_thread_score false int No The current number of worker threads for backup tasks and other tasks of medium and low priorities. The value range is [0, 100].

    obshell backup show

    You can run this command to query the backup tasks of all tenants or a specified tenant.

    ${home_path}/bin/obshell backup show [flags]
    
    # example
    /home/admin/oceanbase/bin/obshell backup show -d
    

    home_path specifies the installation directory of OceanBase Database. By default, obshell is located in the bin directory of the OceanBase Database installation directory.

    Options are described in the table below:

    Option
    Required
    Data type
    Default value
    Description
    -u/--backup_base_uri No string None Sets the backup destination for all tenants. After setting, each tenant's data backup path and log archive path will be concatenated under this path according to certain rules. If a backup destination was set previously and this option is not configured, the previous configuration will be used; if no backup destination was set previously and this option is not configured, it defaults to empty.
    -m/--backup_mode No string full Data backup mode. Can be full or incremental, representing full backup (full) and incremental backup (incremental) respectively.
    -c/--log_archive_concurrency No int None Sets the total number of worker threads for log archiving.
    -b/--binding No string Optional Sets the priority mode for archiving and business operations. Currently supports Optional (user business priority) and Mandatory (archive priority). If not configured, defaults to Optional mode.
    -i/--piece_switch_interval No string None Configures the switching cycle for pieces. Value range: [1d, 7d].
    -e/--encryption No string None Sets a password for the backup set. If this option is set, the password must be provided when restoring from this backup set, and the password cannot be deleted.
    -l/--archive_lag_target No string None Controls the log archive delay time for tenants. To modify this, please ensure the log archive destination has been configured.
    -D/--delete_policy No string default Sets the cleanup policy. Tenants with a cleanup policy will trigger automatic cleanup once per hour. Currently, only default is supported, which means the automatic cleanup scope is limited to backups under the value of -u/--backup_base_uri.
    -r/--delete_recovery_window No string None Controls the recovery window for backup data. A time unit must be specified. For usage, see Backup Cleanup Parameter Introduction.
    -s/--ha_low_thread_score No int None Specifies the current number of worker threads for low-priority tasks such as backup and backup cleanup. Value range: [0, 100].
    -P/--plus_archive No None None Controls whether to back up archived logs together during data backup. No value required. When this option is added, a complete dataset with archived logs will be generated in the final backup directory.

    obshell tenant backup

    Use this command to configure backup-related options and perform backups for a specified tenant.

    ${home_path}/bin/obshell tenant backup <tenant_name> [flags]
    
    # example
    /home/admin/oceanbase/bin/obshell tenant backup t1 -d /path/to/backup/data --backup_mode incremental --encryption MySecretPassword
    

    home_path is the OceanBase Database installation directory. By default, obshell is located in the bin directory under the OceanBase installation directory. tenant_name should be set to the name of the tenant to be backed up.

    The command options are described as follows:

    Option
    Required
    Data type
    Default value
    Description
    -d/--data_backup_uri No string None Sets the data backup destination for the tenant. If a backup destination was set previously and this option is not configured, the previous configuration will be used; if no backup destination was set previously and this option is not configured, it defaults to empty.
    -a/--archive_log_uri No string None Sets the log archive destination for the tenant. If a log archive destination was set previously and this option is not configured, the previous configuration will be used; if no log archive destination was set previously and this option is not configured, it defaults to empty.
    -m/--backup_mode No string full Data backup mode. Can be full or incremental, representing full backup (full) and incremental backup (incremental) respectively.
    -c/--log_archive_concurrency No int None Total number of worker threads for log archiving.
    -b/--binding No string Optional Sets the priority mode for archiving and business operations. Currently supports Optional (user business priority) and Mandatory (archive priority). If not configured, defaults to Optional mode.
    -i/--piece_switch_interval No string None Configures the switching cycle for pieces. Value range: [1d, 7d].
    -e/--encryption No string None Sets a password for the backup set. If this option is set, the password must be provided when restoring from this backup set, and the password cannot be deleted.
    -l/--archive_lag_target No string None Controls the log archive delay time for the tenant. To modify this, please ensure the log archive destination has been configured.
    -D/--delete_policy No string default Sets the cleanup policy. Tenants with a cleanup policy will trigger automatic cleanup once per hour. Currently, only default is supported, which means the automatic cleanup scope is limited to backups under the values of -d/--data_backup_uri and -a/--archive_log_uri.
    -r/--delete_recovery_window No string None Controls the recovery window for backup data. A time unit must be specified. For usage, see Backup Cleanup Parameter Introduction.
    -s/--ha_low_thread_score No int None Specifies the current number of worker threads for low-priority tasks such as backup and backup cleanup. Value range: [0, 100].
    -P/--plus_archive No None None Controls whether to back up archived logs together during data backup. No value required. When this option is added, a complete dataset with archived logs will be generated in the final backup directory.

    obshell backup show

    Use this command to display backup tasks for all tenants or a specified tenant.

    ${home_path}/bin/obshell backup show [flags]
    
    # example
    /home/admin/oceanbase/bin/obshell backup show -d
    

    home_path is the OceanBase Database installation directory. By default, obshell is located in the bin directory under the OceanBase installation directory.

    Option
    Required
    Data type
    Default value
    Description
    -t/--tenant_name No string None Specifies the tenant name whose backup tasks need to be displayed. If not set, backup tasks for all tenants in the cluster will be displayed.
    -d/--show_detail No None None Controls whether to display detailed information of backup tasks. No value required.

    Previous topic

    Task commands of obshell
    Last

    Next topic

    obshell restore command group
    Next
    What is on this page
    obshell backup set-config
    obshell backup show
    obshell tenant backup
    obshell backup show