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

    Download PDF

    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 Database
    3. SQL
    4. V4.6.0
    iconOceanBase Database
    SQL - V 4.6.0
    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

    oceanbase.DBA_OB_RESTORE_HISTORY

    Last Updated:2026-05-07 11:26:24  Updated
    share
    What is on this page
    Purpose
    Columns
    Sample query
    References

    folded

    share

    Note

    This view is available starting with V4.0.0.

    Purpose

    This view displays the tenant-level restore tasks completed in the current tenant.

    Columns

    Column Type Nullable Description
    JOB_ID bigint(20) NO The job ID of the restore task.
    RESTORE_TENANT_NAME varchar(128) NO The name of the tenant to be restored.
    RESTORE_TENANT_ID bigint(20) NO The ID of the tenant to be restored.
    BACKUP_TENANT_NAME varchar(128) NO The name of the source tenant.
    BACKUP_TENANT_ID bigint(20) NO The ID of the source tenant.
    BACKUP_CLUSTER_NAME varchar(128) NO The name of the source cluster.
    BACKUP_DEST longtext NO The backup set path, which is the data backup path and log archiving path specified by the user.
    RESTORE_SCN bigint(20) unsigned NO The restore point specified by the user.
    RESTORE_SCN_DISPLAY datetime(6) NO The timestamp of the restore point specified by the user.
    RESTORE_OPTION varchar(4096) NO The restore option specified by the user when initiating the restore task.
    RESTORE_TYPE varchar(4096) NO The restore type. Valid values: FULL and QUICK.
    • FULL: full restore
    • QUICK: quick restore

    Note

    This column is available starting with V4.3.5 BP1.

    START_TIMESTAMP timestamp(6) YES The timestamp when the restore task started.
    FINISH_TIMESTAMP timestamp(6) YES The timestamp when the restore task ended.
    STATUS varchar(64) NO The restore result. Valid values: SUCCESS and FAILED.
    BACKUP_PIECE_LIST longtext NO The log archive shard paths required for the restore task. The shards are separated with commas (,). Example: file:///data/nfs/backup/archive/2_1_2,file:///data/nfs/backup/archive/2_1_3
    BACKUP_SET_LIST longtext NO The data backup set paths required for the restore task. The backup sets are separated with commas (,). Example: file:///data/nfs/backup/data/backup_set_1_full,file:///data/nfs/backup/data/backup_set_2_inc
    BACKUP_CLUSTER_VERSION bigint(20) NO The version of the source cluster.
    LS_COUNT bigint(20) NO The total number of log streams.
    FINISH_LS_COUNT bigint(20) NO The number of log streams that have been restored.
    TABLET_COUNT bigint(20) NO The total number of tablets.
    FINISH_TABLET_COUNT bigint(20) NO The number of tablets that have been restored.
    TOTAL_BYTES bigint(20) NO The total number of bytes.
    TOTAL_BYTES_DISPLAY varchar(27) NO The total number of bytes, displayed in the storage capacity unit.
    FINISH_BYTES bigint(20) NO The number of bytes that have been restored.
    FINISH_BYTES_DISPLAY varchar(27) NO The number of bytes that have been restored, displayed in the storage capacity unit.
    DESCRIPTION varchar(1024) YES The DESCRIPTION information specified in the restore command.
    COMMENT varchar(1024) YES The failure information recorded when the restore task failed.

    Sample query

    Query the tenant-level restore tasks completed in the sys tenant.

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

    The query result is as follows:

    *************************** 1. row ***************************
                    JOB_ID: 1
       RESTORE_TENANT_NAME: mysql_test
         RESTORE_TENANT_ID: 1006
        BACKUP_TENANT_NAME: mysql001
          BACKUP_TENANT_ID: 1002
       BACKUP_CLUSTER_NAME: test425
               BACKUP_DEST: file:///home/admin/oceanbase/arglog,file:///home/admin/oceanbase/backupdata
               RESTORE_SCN: 1736236006946129000
       RESTORE_SCN_DISPLAY: 2025-01-07 15:46:46.946129
            RESTORE_OPTION: pool_list=rptest
              RESTORE_TYPE: QUICK
           START_TIMESTAMP: 2025-01-07 15:48:35.993556
          FINISH_TIMESTAMP: 2025-01-07 15:51:11.301331
                    STATUS: FAIL
         BACKUP_PIECE_LIST: file:///home/admin/oceanbase/arglog/piece_d1001r1p1
           BACKUP_SET_LIST: file:///home/admin/oceanbase/backupdata/backup_set_3_full
    BACKUP_CLUSTER_VERSION: 17180001538
                  LS_COUNT: 0
           FINISH_LS_COUNT: 0
              TABLET_COUNT: 0
       FINISH_TABLET_COUNT: 0
               TOTAL_BYTES: 0
       TOTAL_BYTES_DISPLAY: 0.00MB
              FINISH_BYTES: 0
      FINISH_BYTES_DISPLAY: 0.00MB
               DESCRIPTION: NULL
                   COMMENT: ROOTSERVICE : OB_TENANT_NOT_EXIST(-5157) on "172.xx.xxx.xxx:2882" with traceid YB42xxxxxxxx-xxxxxxxxxxxxxxxxx-x-x
    *************************** 2. row ***************************
                    JOB_ID: 2
       RESTORE_TENANT_NAME: AUX_RECOVER$1736237253959061
         RESTORE_TENANT_ID: 1008
        BACKUP_TENANT_NAME: mysql001
          BACKUP_TENANT_ID: 1002
       BACKUP_CLUSTER_NAME: test425
               BACKUP_DEST: file:///home/admin/oceanbase/arglog,file:///home/admin/oceanbase/backupdata
               RESTORE_SCN: 1736237207609421000
       RESTORE_SCN_DISPLAY: 2025-01-07 16:06:47.609421
            RESTORE_OPTION: pool_list=rptest
              RESTORE_TYPE: QUICK
           START_TIMESTAMP: 2025-01-07 16:07:33.973129
          FINISH_TIMESTAMP: 2025-01-07 16:11:24.689245
                    STATUS: SUCCESS
         BACKUP_PIECE_LIST: file:///home/admin/oceanbase/arglog/piece_d1001r1p1
           BACKUP_SET_LIST: file:///home/admin/oceanbase/backupdata/backup_set_4_full
    BACKUP_CLUSTER_VERSION: 17180001538
                  LS_COUNT: 2
           FINISH_LS_COUNT: 0
              TABLET_COUNT: 676
       FINISH_TABLET_COUNT: 676
               TOTAL_BYTES: 21145561
       TOTAL_BYTES_DISPLAY: 20.17MB
              FINISH_BYTES: 0
      FINISH_BYTES_DISPLAY: 0.00MB
               DESCRIPTION: NULL
                   COMMENT:
    2 rows in set
    

    References

    • Query the tenant-level restore tasks completed in all tenants: CDB_OB_RESTORE_HISTORY

    • Query the execution progress of all tenant-level restore tasks: CDB_OB_RESTORE_PROGRESS

    • For more information about the physical restore results, see View the restore history.

    Previous topic

    oceanbase.DBA_OB_RESOURCE_POOLS
    Last

    Next topic

    oceanbase.DBA_OB_RESTORE_PROGRESS
    Next
    What is on this page
    Purpose
    Columns
    Sample query
    References