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

    View the data backup history

    Last Updated:2024-12-02 03:48:29  Updated
    Share
    What is on this page
    View the data backup history in the sys tenant
    View the data backup history in a user tenant

    folded

    Share

    You can query views for the backup history.

    View the data backup history in the sys tenant

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

    2. View the data backup history.

      • View the job history

        A job corresponds to an initiated backup.

        obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_JOB_HISTORY\G
        

        The query result is as follows:

        *************************** 1. row ***************************
                  TENANT_ID: 1002
                     JOB_ID: 1
                INCARNATION: 1
              BACKUP_SET_ID: 1
        INITIATOR_TENANT_ID: 1002
           INITIATOR_JOB_ID: 0
         EXECUTOR_TENANT_ID: 1002
            PLUS_ARCHIVELOG: OFF
                BACKUP_TYPE: FULL
                  JOB_LEVEL: USER_TENANT
            ENCRYPTION_MODE: NONE
                     PASSWD:
            START_TIMESTAMP: 2024-01-31 11:20:59.804836
              END_TIMESTAMP: 2024-01-31 11:23:08.773566
                     STATUS: COMPLETED
                     RESULT: 0
                    COMMENT:
                DESCRIPTION:
                       PATH: file:///data/nfs/backup/data
        *************************** 2. row ***************************
                  TENANT_ID: 1002
                     JOB_ID: 2
                INCARNATION: 1
              BACKUP_SET_ID: 2
        INITIATOR_TENANT_ID: 1002
           INITIATOR_JOB_ID: 0
         EXECUTOR_TENANT_ID: 1002
            PLUS_ARCHIVELOG: OFF
                BACKUP_TYPE: INC
                  JOB_LEVEL: USER_TENANT
            ENCRYPTION_MODE: NONE
                     PASSWD:
            START_TIMESTAMP: 2024-01-31 13:47:57.218929
              END_TIMESTAMP: 2024-01-31 13:50:14.985358
                     STATUS: COMPLETED
                     RESULT: 0
                    COMMENT:
                DESCRIPTION:
                       PATH: file:///data/nfs/backup/data
        2 rows in set
        
      • View the task history

        A task corresponds to a backup set.

        obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_TASK_HISTORY\G
        

        The query result is as follows:

        *************************** 1. row ***************************
                       TENANT_ID: 1002
                         TASK_ID: 1
                          JOB_ID: 1
                     INCARNATION: 1
                   BACKUP_SET_ID: 1
                 START_TIMESTAMP: 2024-01-31 11:20:59.804836
                   END_TIMESTAMP: 2024-01-31 11:23:08.762451
                          STATUS: COMPLETED
                       START_SCN: 1706671262627179000
                         END_SCN: 1706671388756316000
               USER_LS_START_SCN: 1706671278153636000
                 ENCRYPTION_MODE: NONE
                          PASSWD:
                     INPUT_BYTES: 198130272
                    OUTPUT_BYTES: 16984419
               OUTPUT_RATE_BYTES: 131705.4367
                EXTRA_META_BYTES: 0
                    TABLET_COUNT: 617
             FINISH_TABLET_COUNT: 617
               MACRO_BLOCK_COUNT: 94
        FINISH_MACRO_BLOCK_COUNT: 94
                      FILE_COUNT: 0
                    META_TURN_ID: 1
                    DATA_TURN_ID: 0
                          RESULT: 0
                         COMMENT:
                            PATH: file:///data/nfs/backup/data
                   MINOR_TURN_ID: 1
                   MAJOR_TURN_ID: 1
        *************************** 2. row ***************************
                       TENANT_ID: 1002
                         TASK_ID: 2
                          JOB_ID: 2
                     INCARNATION: 1
                   BACKUP_SET_ID: 2
                 START_TIMESTAMP: 2024-01-31 13:47:57.218929
                   END_TIMESTAMP: 2024-01-31 13:50:14.974017
                          STATUS: COMPLETED
                       START_SCN: 1706680089128492000
                         END_SCN: 1706680214967798000
               USER_LS_START_SCN: 1706680104341550000
                 ENCRYPTION_MODE: NONE
                          PASSWD:
                     INPUT_BYTES: 42941657
                    OUTPUT_BYTES: 14592769
               OUTPUT_RATE_BYTES: 105932.7043
                EXTRA_META_BYTES: 0
                    TABLET_COUNT: 617
             FINISH_TABLET_COUNT: 617
               MACRO_BLOCK_COUNT: 20
        FINISH_MACRO_BLOCK_COUNT: 20
                      FILE_COUNT: 0
                    META_TURN_ID: 1
                    DATA_TURN_ID: 0
                          RESULT: 0
                         COMMENT:
                            PATH: file:///data/nfs/backup/data
                   MINOR_TURN_ID: 1
                   MAJOR_TURN_ID: 1
        2 rows in set
        

        The columns in the oceanbase.CDB_OB_BACKUP_JOB_HISTORY view correspond to those in the oceanbase.CDB_OB_BACKUP_JOBS view. The columns in the oceanbase.CDB_OB_BACKUP_TASK_HISTORY view correspond to those in the oceanbase.CDB_OB_BACKUP_TASKS view. The COMMENT column records the error information of a failed job or task.

      For more information about the CDB_OB_BACKUP_JOB_HISTORY and CDB_OB_BACKUP_TASK_HISTORY views, see CDB_OB_BACKUP_JOB_HISTORY and CDB_OB_BACKUP_TASK_HISTORY.

    3. View the backup sets.

      obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_SET_FILES WHERE TENANT_ID = 1002 AND BACKUP_SET_ID = 1\G
      

      The query result is as follows:

      *************************** 1. row ***************************
                     TENANT_ID: 1002
                 BACKUP_SET_ID: 1
                       DEST_ID: 1002
                   INCARNATION: 1
                   BACKUP_TYPE: FULL
       PREV_FULL_BACKUP_SET_ID: 0
        PREV_INC_BACKUP_SET_ID: 0
               START_TIMESTAMP: 2024-01-31 11:20:59.804836
                 END_TIMESTAMP: 2024-01-31 11:23:08.762451
                        STATUS: SUCCESS
                   FILE_STATUS: AVAILABLE
              ELAPSED_SECONDES: 129
               PLUS_ARCHIVELOG: OFF
              START_REPLAY_SCN: 1706670992366131000
      START_REPLAY_SCN_DISPLAY: 2024-01-31 11:16:32.366131
               MIN_RESTORE_SCN: 1706671388756316000
       MIN_RESTORE_SCN_DISPLAY: 2024-01-31 11:23:08.756316000
                   INPUT_BYTES: 198130272
                  OUTPUT_BYTES: 16984419
             OUTPUT_RATE_BYTES: 131705.4367
              EXTRA_META_BYTES: 0
                  TABLET_COUNT: 617
           FINISH_TABLET_COUNT: 617
             MACRO_BLOCK_COUNT: 94
      FINISH_MACRO_BLOCK_COUNT: 94
                    FILE_COUNT: 0
                  META_TURN_ID: 1
                  DATA_TURN_ID: 0
                        RESULT: 0
                       COMMENT:
               ENCRYPTION_MODE: NONE
                        PASSWD:
             TENANT_COMPATIBLE: 4.2.2.0
             BACKUP_COMPATIBLE: 3
                          PATH: file:///data/nfs/backup/data
               CLUSTER_VERSION: 4.2.2.0
                CONSISTENT_SCN: 1706671288404894000
                 MINOR_TURN_ID: 1
                 MAJOR_TURN_ID: 1
      1 row in set
      

      For more information about the CDB_OB_BACKUP_SET_FILES view, see CDB_OB_BACKUP_SET_FILES.

    View the data backup history in a user tenant

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

    2. View the data backup history.

      • View the job history

        A job corresponds to an initiated backup.

        MySQL mode
        Oracle mode

        Here is an example in MySQL mode:

        obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_JOB_HISTORY\G
        

        Here is an example in Oracle mode:

        obclient [SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_TASK_HISTORY\G
        
      • View the task history

        A task corresponds to a backup set.

        MySQL mode
        Oracle mode

        Here is an example in MySQL mode:

        obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_TASK_HISTORY\G
        

        Here is an example in Oracle mode:

        obclient [SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_TASK_HISTORY\G
        
    3. View the backup sets.

      MySQL mode
      Oracle mode

      Here is an example in MySQL mode:

      obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_SET_FILES WHERE BACKUP_SET_ID = 1 \G
      

      Here is an example in Oracle mode:

      obclient [SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_SET_FILES WHERE BACKUP_SET_ID = 1 \G
      

    Previous topic

    View the data backup progress
    Last

    Next topic

    View data backup parameter settings
    Next
    What is on this page
    View the data backup history in the sys tenant
    View the data backup history in a user tenant