OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Loader and Dumper

V4.3.6
  • Document Overview
  • Introduction
  • Technical Mechanism
  • Preparations
    • Prepare the environment
    • Prepare data
    • Download OBLOADER & OBDUMPER
    • Startup parameters
  • User Guide (OBLOADER)
    • Quick start
    • Command-line options
    • Multi-database import
    • Direct load
    • Data processing
      • Define a control file
      • Preprocessing functions
      • Case expressions
    • Use cases of command-line options
    • Performance tuning
    • Error handling
    • FAQ
  • User Guide (OBDUMPER)
    • Quick start
    • Command-line options
    • Multi-database export
    • Data processing
      • Define a control file
      • Preprocessing functions
      • Case expressions
    • Performance tuning
    • FAQ
  • Security Features
  • Connection configuration
  • Self-service Troubleshooting
  • Release Note
    • Release Note
      • 4.x
        • OBLOADER & OBDUMPER V4.3.6
        • OBLOADER & OBDUMPER V4.3.5
        • OBLOADER & OBDUMPER V4.3.4.1
        • OBLOADER & OBDUMPER V4.3.4
        • OBLOADER & OBDUMPER V4.3.3.1
        • OBLOADER & OBDUMPER V4.3.3
        • OBLOADER & OBDUMPER V4.3.2.1
        • OBLOADER & OBDUMPER V4.3.2
        • OBLOADER & OBDUMPER V4.3.1.1
        • OBLOADER & OBDUMPER V4.3.1
        • OBLOADER & OBDUMPER V4.3.0
        • OBLOADER & OBDUMPER V4.2.8.2
        • OBLOADER & OBDUMPER V4.2.8.1
        • OBLOADER & OBDUMPER V4.2.8
        • OBLOADER & OBDUMPER V4.2.7
        • OBLOADER & OBDUMPER V4.2.6
        • OBLOADER & OBDUMPER V4.2.5
        • OBLOADER & OBDUMPER V4.2.4
        • OBLOADER & OBDUMPER V4.2.1
        • OBLOADER & OBDUMPER V4.1.0
        • OBLOADER & OBDUMPER V4.0.0
      • 3.x
        • OBLOADER \& OBDUMPER V3.1.0
        • OBLOADER \& OBDUMPER V3.0.0
    • Versioning rules

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Loader and Dumper
  3. V4.3.6

Multi-database export

Last Updated:2026-09-04 08:19:58

Implementation
Single-database mode
Multi-database mode
Examples
Scenario 1: Single-database export (unchanged)
Scenario 2: Multi-database export (export multiple databases in one task)
Scenario 3: Tenant-level export (indirectly achieving full-tenant export)

OBDUMPER V4.3.5 and later versions support exporting database objects to multiple databases or schemas in a single export task, while maintaining the original single-database export behavior.

Implementation

Single-database mode

If the object parameters such as --table and --view do not contain specific databases or schemas (i.e., no periods are present), it is considered a single-database export. The default database specified by -D is used.

Multi-database mode

If any object parameter value contains specific databases or schemas (i.e., periods are present), it enters multi-database export mode. For example, test.table1, test1.*, *.*, test[0-9].tbl, test*.table, or test?.tbl.

In multi-database mode, a single multi-database export command is split into multiple single-database export subtasks. The details are as follows:

  • The object parameters such as --table and --view are parsed, and <schema.object> is distributed to corresponding database/schema subtasks, specifying the export scope.

  • If an object does not contain specific databases or schemas (e.g., --table 'db1.tbl1, tbl2' -D 'db2'), the default database specified by -D is used, while other options remain unchanged.

In multi-database mode, exporting objects to different databases/schemas can be understood as executing multiple single-database export tasks. Here is an example:

obdumper -D test --table 'test1.tbl1,test2.tbl2' ...
-> obdumper -D test1 --table tbl1 ...
-> obdumper -D test2 --table tbl2 ...

obdumper -D test --table 'tbl1,test2.tbl2' ...
-> obdumper -D test --table tbl1 ...
-> obdumper -D test2 --table tbl2 ...

The default export directory structure will add a database/schema level directory on the original directory level. Here is an example:

./outputs/
└── data
    ├── test
    │   ├── TABLE
    │   │   ├── sample_tbl1.csv
    │   │   ├── sample_tbl1-schema.sql
    │   │   ├── sample_tbl2.csv
    │   │   └── sample_tbl2-schema.sql
    │   └── VIEW
    │       ├── sample_tbl1_view-schema.sql
    │       └── sample_tbl2_view-schema.sql
    └── test1
        ├── TABLE
        │   ├── sample_tbl1.csv
        │   ├── sample_tbl1-schema.sql
        │   ├── sample_tbl2.csv
        │   └── sample_tbl2-schema.sql
        └── VIEW
            ├── sample_tbl1_view-schema.sql
            └── sample_tbl2_view-schema.sql

7 directories, 12 files

Notice

If the database or schema name contains [, {, or other wildcard control characters, you need to escape these characters to successfully export.

Examples

Scenario 1: Single-database export (unchanged)

Export the test database to /outputs.

./obdumper -h xxx.xxx.xxx.xxx -P 2883 -u test@mysql#cluster_a -p ****** -D test --csv --table '*' -f /outputs

Scenario 2: Multi-database export (export multiple databases in one task)

  • Method 1

    ./obdumper -h xxx.xxx.xxx.xxx -P 2883 -u test@mysql#cluster_a -p ****** --csv --table 'test[1-3].*' -f /outputs
    
  • Method 2

    ./obdumper -h xxx.xxx.xxx.xxx -P 2883 -u test@mysql#cluster_a -p ****** --csv --table 'test1.*, test2.*, test3.*' -f /outputs
    
  • Method 3

    ./obdumper -h xxx.xxx.xxx.xxx -P 2883 -u test@mysql#cluster_a -p ****** --csv --table 'test1.*' --table 'test2.*' --table 'test3.*' -f /outputs
    

Scenario 3: Tenant-level export (indirectly achieving full-tenant export)

Export all objects from all databases, including definitions and data.

./obdumper -h xxx.xxx.xxx.xxx -P 2883 -u test@mysql#cluster_a -p ****** --table '*.*' --ddl --csv --all -f /outputs

Previous topic

Command-line options
Last

Next topic

Define a control file
Next
on this page
Implementation
Single-database mode
Multi-database mode
Examples
Scenario 1: Single-database export (unchanged)
Scenario 2: Multi-database export (export multiple databases in one task)
Scenario 3: Tenant-level export (indirectly achieving full-tenant export)