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 & 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.6.0
    iconOceanBase Database
    SQL - V 4.6.0
    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

    oceanbase.DBA_OB_BACKUP_DELETE_TASKS

    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 information about the backup_set/backup_piece cleanup tasks being executed in the current tenant.

    Columns

    Column
    Type
    Nullable
    Description
    TASK_ID bigint(20) NO The task group ID, used to identify a group of tasks.
    INCARNATION bigint(20) NO The incarnation ID.
    JOB_ID bigint(20) NO The task ID, corresponding to the JOB table.
    TASK_TYPE varchar(64) NO The task type. Valid values:
    • BACKUP SET: specifies the backup_set cleanup task.
    • BACKUP PIECE: specifies the backup_piece cleanup task.
    ID bigint(20) NO The task ID, including backup_set and piece.
    ROUND_ID bigint(20) NO The dest_round_id of the piece. For the cleanup of a backup_set, the value of this column is 0.
    DEST_ID bigint(20) NO The DEST_ID of the backup destination.
    START_TIMESTAMP timestamp(6) NO The start time of the task.
    END_TIMESTAMP timestamp(6) NO The end time of the task.
    STATUS varchar(64) NO The task status. Valid values:
    • INIT: the task is being initialized.
    • DOING: the task is being executed.
    • CANCELING: the task is being canceled.
    • COMPLETED: the task is executed successfully.
    • FAILED: the task fails.
    • CANCELED: the task is canceled successfully.
    TOTAL_TASK_COUNT bigint(20) YES The number of subtasks.
    • In SN mode, this column indicates the number of all ls_task.
    • In SS mode, for a log archive piece, this column indicates the number of all ls_task. For a data backup set, this column indicates the number of all macro_task.

    Note

    For V4.6.x, this column is available starting with V4.6.0.

    FINISH_TASK_COUNT bigint(20) YES The number of completed subtasks.
    • In SN mode, this column indicates the number of completed ls_task.
    • In SS mode, for a log archive piece, this column indicates the number of completed ls_task. For a data backup set, this column indicates the number of completed macro_task.

    Note

    For V4.6.x, this column is available starting with V4.6.0.

    RESULT bigint(20) YES The error code.
    COMMENT varchar(4096) YES The comment.
    PATH varchar(1024) NO The backup destination of the backup_set/backup_piece.

    Sample query

    Query the information about the backup_set or backup_piece cleanup tasks being executed in the current tenant.

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

    The query result is as follows:

    *************************** 1. row ***************************
               TASK_ID: 4
           INCARNATION: 1
                JOB_ID: 7
             TASK_TYPE: BACKUP SET
                    ID: 1
              ROUND_ID: 0
               DEST_ID: 1002
       START_TIMESTAMP: 2022-06-01 12:09:50.800772
         END_TIMESTAMP: 2022-06-01 12:09:54.954691
                STATUS: COMPLETED
      TOTAL_TASK_COUNT: 2
     FINISH_TASK_COUNT: 2
                RESULT: 0
               COMMENT:
                  PATH: file:///data/nfs/backup/data
    *************************** 2. row ***************************
               TASK_ID: 5
           INCARNATION: 1
                JOB_ID: 7
             TASK_TYPE: BACKUP PIECE
                    ID: 1
              ROUND_ID: 1
               DEST_ID: 1001
       START_TIMESTAMP: 2022-06-01 12:09:50.968413
         END_TIMESTAMP:
                STATUS: DOING
      TOTAL_TASK_COUNT: 2
     FINISH_TASK_COUNT: 1
                RESULT: 0
               COMMENT:
                  PATH: file:///data/nfs/backup/archive
    2 rows in set
    

    References

    • Query the execution progress of the backup cleanup job task being executed: DBA_OB_BACKUP_DELETE_JOBS

    • Query the historical information about the backup cleanup job task: DBA_OB_BACKUP_DELETE_JOB_HISTORY

    • Query the historical information about the backup cleanup task: DBA_OB_BACKUP_DELETE_TASK_HISTORY

    • For more information about how to set the automatic cleanup of expired backups, see Automatic cleanup of expired backups.

    Previous topic

    oceanbase.DBA_OB_BACKUP_DELETE_TASK_HISTORY
    Last

    Next topic

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