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

    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.3
    iconOceanBase Database
    SQL - V 4.3.3
    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

    Initiate a full data backup job

    Last Updated:2024-12-02 03:48:29  Updated
    share
    What is on this page
    Prerequisites
    (Optional) Preparations
    Procedure
    Initiate a full data backup job from the sys tenant
    Initiate a full data backup job for a user tenant
    References

    folded

    share

    This topic describes how to initiate a data backup job after you initiate a log archiving job.

    Prerequisites

    Before you initiate a full data backup job, make sure that you have enabled the log archiving (ARCHIVELOG) mode. You can initiate a data backup job only when STATUS of the log archiving job is DOING.

    For more information about how to view the status of a log archiving job, see View the archiving progress.

    For more information about how to enable ARCHIVELOG, see Enable ARCHIVELOG.

    (Optional) Preparations

    Before you initiate a data backup job, you can set a password for the backup set.

    1. Log in to the sys tenant of the cluster as the root user.

    2. (Optional) Run the following command to set a backup password:

      Note

      This password is the password of the backup set after the backup job is completed. When this parameter is set, you must enter this password to restore data by using this backup set. This password cannot be deleted.

      obclient [(none)]> SET ENCRYPTION ON IDENTIFIED BY 'password' ONLY;
      

      Here is an example:

      obclient [(none)]> SET ENCRYPTION ON IDENTIFIED BY '******' ONLY;
      

      Note

      After you set a backup password, you can disconnect the session and reconnect to the database to cancel the setting before a data backup job is initiated.

    Procedure

    After you complete the preparations, you can perform the following steps to initiate a full data backup job.

    Assume that the current cluster contains three tenants: sys, mysql_tenant, and oracle_tenant, and that backup preparations have been completed for the mysql_tenant and oracle_tenant tenants.

    Initiate a full data backup job from the sys tenant

    You can initiate a full data backup job for all tenants or a specified tenant in the cluster from the sys tenant.

    1. Log in to the sys tenant of the cluster as the root user.

    2. (Optional) Set the backup concurrency for the tenant.

      You can configure the backup concurrency by setting the tenant-level parameter ha_low_thread_score, which specifies the number of worker threads for job queues with a low or medium priority, such as backup job queues and backup cleanup job queues. The value range is [0, 100]. The default value is 0. Before you start the backup job, you can increase the value of ha_low_thread_score. We recommend that you double the value each time. For more information about the operations related to the ha_low_thread_score parameter, see View data backup parameter settings.

      For more information about the ha_low_thread_score parameter, see ha_low_thread_score.

      • Execute the following statement to set the backup concurrency for all tenants in the cluster:

        obclient [(none)]>  ALTER SYSTEM SET ha_low_thread_score = 10 TENANT = all_user;
        

        Alternatively, execute the following statement:

        obclient [(none)]>  ALTER SYSTEM SET ha_low_thread_score = 10 TENANT = all;
        

        Note

        In OceanBase Database V4.2.1 and later, TENANT = all_user and TENANT = all express the same semantics. If you want an operation to take effect on all user tenants, we recommend that you use TENANT = all_user. TENANT = all will be deprecated.

      • Execute the following statement to set the backup concurrency for a specified tenant in the cluster:

        obclient [(none)]>  ALTER SYSTEM SET ha_low_thread_score = 10 TENANT = mysql_tenant;
        
    3. Initiate a full data backup job.

      • Initiate a full data backup job for all tenants in the cluster

        You can initiate a full data backup job for all tenants in the cluster.

        ALTER SYSTEM BACKUP DATABASE [PLUS ARCHIVELOG];
        

        Here, PLUS ARCHIVELOG is optional. If you specify PLUS ARCHIVELOG, the archive logs are also backed up during data backup, and a data set with archive logs will be generated in the data backup directory. You can use this dataset to restore the tenant data to the SCN specified by MIN_RESTORE_SCN. In addition, if you use OceanBase Database Community Edition or OceanBase Database's standalone mode, you can use this dataset to create a standby tenant. For more information, see Create a standby tenant by using the BACKUP DATABASE PLUS ARCHIVELOG feature.

        To initiate a full data backup job for all tenants in the cluster, execute the following statement:

        obclient [(none)]> ALTER SYSTEM BACKUP DATABASE;
        

        In this example, the system initiates a full data backup job for the mysql_tenant and oracle_tenant tenants in the cluster.

      • Initiate a full data backup job for a specified tenant in the cluster

        You can initiate a full data backup job for a specified tenant without affecting other tenants in the cluster. Here is a sample statement:

        ALTER SYSTEM BACKUP TENANT = mysql_tenant [PLUS ARCHIVELOG];
        

        To initiate a full data backup job for the mysql_tenant tenant, execute the following statement:

        obclient [(none)]> ALTER SYSTEM BACKUP TENANT = mysql_tenant;
        

        Note

        If you specify multiple tenants, separate the tenant names with commas (,).

        After the statement is executed, the system initiates a full data backup job for the mysql_tenant tenant.

      You can view the backup progress in real time. For more information, see View the data backup progress.

    Initiate a full data backup job for a user tenant

    You can initiate a full data backup job for a user tenant without affecting other tenants.

    1. Log in to the database as a tenant administrator.

      In this example, you can log in to the mysql_tenant tenant as the root user, or to the oracle_tenant tenant as the SYS user.

    2. (Optional) Set the backup concurrency.

      You can configure the backup concurrency by setting the tenant-level parameter ha_low_thread_score, which specifies the number of worker threads for job queues with a low or medium priority, such as backup job queues and backup cleanup job queues. The value range is [0, 100]. The default value is 0. Before you start the backup job, you can increase the value of ha_low_thread_score. We recommend that you double the value each time. For more information about the operations related to the ha_low_thread_score parameter, see View data backup parameter settings.

      For more information about the ha_low_thread_score parameter, see ha_low_thread_score.

      obclient [(none)]>  ALTER SYSTEM SET ha_low_thread_score = 10;
      
    3. Execute the following statement to initiate a full data backup job:

      ALTER SYSTEM BACKUP DATABASE [PLUS ARCHIVELOG];
      

      Here, PLUS ARCHIVELOG is optional. If you specify PLUS ARCHIVELOG, the archive logs are also backed up during data backup, and a data set with archive logs will be generated in the data backup directory. You can use this dataset to restore the tenant data to the SCN specified by MIN_RESTORE_SCN. In addition, if you use OceanBase Database Community Edition or OceanBase Database in standalone mode, you can use this dataset to create a standby tenant. For more information, see Create a standby tenant by using the BACKUP DATABASE PLUS ARCHIVELOG feature.

      To initiate a full data backup job for the current tenant, execute the following statement:

      obclient [(none)]> ALTER SYSTEM BACKUP DATABASE;
      

      After the statement is executed, the system initiates a full data backup job for the current tenant.

      You can view the backup progress in real time. For more information, see View the data backup progress.

    References

    • View the data backup progress

    • View the data backup history

    Previous topic

    Preparations
    Last

    Next topic

    Initiate an incremental data backup job
    Next
    What is on this page
    Prerequisites
    (Optional) Preparations
    Procedure
    Initiate a full data backup job from the sys tenant
    Initiate a full data backup job for a user tenant
    References