OBDUMPER specifies the information to be exported by using command-line options. For more information about the options and usage examples, see Options and Usage examples.
Overview
Option styles
OBDUMPER supports command-line options in Unix and GNU styles.
Unix style: An option is prefixed with a hyphen and each option is a single character, such as
ps -e. In this style, you can omit the space between an option and its value, such as-p******.GNU style: An option is prefixed with double hyphens and each option is a single character or a string, such as
ps --version. An option and its value must be separated with a space, such as--table 'test'.
Option categories
Command-line options in OBDUMPER are classified into basic options and advanced options.
Basic options: general options of OBDUMPER, including connection options (such as the database connection method), feature options (such as the file format, database object type, and storage path), and other options.
Advanced options: feature options (such as the timestamp format, allowlist- and blocklist-based table/column filtering settings, and error handling method) and performance options.
Required options
When using OBDUMPER to export data, you must specify at least the connection options, format options, database object type options, and storage path options.
Example:
$./obdumper -h xx.x.x.x -P 2883 -u test@mysql#cluster_a -p ****** -D USERA --csv --table '*' -f /output
In this example, -h, -P, -u, -p, and -D are connection options; --csv is a file format option; --table is a database object type option; and -f specifies the storage path.
Basic options
Connection options
OBDUMPER commands can read and write data only after connecting to OceanBase Database. You can specify the following options to connect to OceanBase Database.
Export type
| Export type | Related command-line options |
|---|---|
| OceanBase Database |
|
| Cloud OceanBase Database | --public-cloud Indicates that database objects or table data in the OceanBase cluster deployed with Cloud OceanBase Database are exported to a file. If you specify this option in the command line, you do not need to specify the tenant name and cluster name in the connection option (such as -u <user>@<tenant>#<cluster>). In this case, the export program automatically opens the --no-sys option. For more information about the --no-sys option, see the corresponding option description. |
| ODP (Sharding) logical database |
|
Features
File formats
| Format (CLI option) | Related CLI options | Applicable scenarios |
|---|---|---|
| --csv Specifies the CSV format for the exported data file. |
|
Applicable to almost all business scenarios. |
| --cut Specifies the CUT format for the exported data file. |
|
Similar to CSV. It is generally recommended to export data in CSV format. |
| POS ( --cut ) POS format is also known as Fixed-Length (fixed-length) format. Unlike CSV format, it uses fields of fixed length to store data, with each field's length being predefined. NoticeThe CLI option for this format is still CUT. When using this format, you need to set the column delimiter ( --column-splitter ) to an empty character and specify the column lengths through a control file. |
|
Used to interact with data unloading platforms that only support fixed-length formats. |
| --sql Specifies the SQL format for the exported data file. |
|
Applicable to almost all business scenarios. |
| --mix Specifies the MIX file format. |
|
Applicable for exporting SQL files in any format. It offers better compatibility but has significantly lower performance compared to --sql. The current implementation reads all text into memory before parsing, making it unsuitable for handling large data files. |
| --par Used to identify Parquet format data files. |
|
Backup scenarios that require a balance between data compression and export performance. The import and export performance is similar to CSV. The compression rate is relatively high. NoteIn experimental environments, the expected compression rate is around 20%. The distribution characteristics of the data significantly affect the compression rate. For example, data with higher repetition rates have higher compression rates. We recommend that you enable parallel writing to achieve optimal performance. |
| --orc Used to identify ORC format data files. |
|
Scenarios that require extreme data compression. The import and export performance is slightly worse than CSV. Due to known issues with third-party components (Apache ORCWriter), the memory required during export may be higher. The compression rate is generally higher than that of Parquet. However, it still depends on the data distribution. We recommend that you enable parallel writing to achieve optimal performance. |
| --ddl Used to export DDL files. |
|
Logical backup. |
Note
For more information about the command-line options, see the Options section.
Database object types
--all
This option is used to export all database object definitions and table data. It is a collection of database object types such as
--triggerand--view. The usage restrictions apply to specific database object types.When used with
--ddl, this option indicates exporting all database object definitions. For database object types applicable only to OceanBase Database Oracle mode, such as--trigger, even if you specify--all --ddl, the DDL of triggers cannot be exported in an OceanBase Database MySQL tenant.When used with
--csv,--sql, or--cut, this option indicates exporting all data in tables in the specified format. If you need to export all database object definitions and table data, you can specify--alland--ddlwith any data format option.
Notice
--allis mutually exclusive with any other database object option. If both--alland any other database object option are specified,--alltakes precedence.--table-group 'table_group_name [,table_group_name...]' | --table-group '*'
This option is used to export the definitions of table groups. Except for not supporting data export, the description is the same as that of the
--tableoption.--table 'table_name [,table_name...]' | --table '*'
This option is used to export the definitions or data of tables. When used with
--ddl, this option indicates exporting only the table definitions. When used with any data format option, this option indicates exporting only the table data. If multiple tables are specified, separate the table names with commas (,). By default, the names of tables in OceanBase Database Oracle mode are exported in uppercase, and the names of tables in OceanBase Database MySQL mode are exported in lowercase. For example, in OceanBase Database Oracle mode,--table 'test'and--table 'TEST'both indicate the TEST table. In OceanBase Database MySQL mode,--table 'test'and--table 'TEST'both indicate the test table. If you want to distinguish between uppercase and lowercase, enclose the table name in brackets ([ ]). For example,--table '[test]'indicates the test table, and--table '[TEST]'indicates the TEST table. If the table name is specified as an asterisk (*), all table definitions or data are exported.Note
OBDUMPER 4.1.0 and later versions support exporting the definitions of temporary tables in OceanBase Database Oracle mode.
--view 'view_name [, view_name...]' | --view '* '
This option is used to export the definitions of views. Except for not supporting data export, the description is the same as that of the
--tableoption.--trigger 'trigger_name [, trigger_name...]' | --trigger '*'
This option is used to export the definitions of triggers. Except for not supporting data export, the description is the same as that of the
--tableoption. Currently, this option applies only to OceanBase Database Oracle mode.--sequence 'sequence_name [, sequence_name...]' | --sequence '*'
This option is used to export the definitions of sequences. Except for not supporting data export, the description is the same as that of the
--tableoption.Notice
OBDUMPER 4.0.0 and earlier versions apply only to OceanBase Database Oracle mode. OBDUMPER 4.1.0 and later versions apply to both OceanBase Database MySQL and OceanBase Database Oracle modes.
--synonym 'synonym_name [, synonym_name...]' | --synonym '*'
This option is used to export the definitions of synonyms. Except for not supporting data export, the description is the same as that of the
--tableoption. Currently, this option applies only to OceanBase Database Oracle mode.--type 'type_name [, type_name...]' | --type '*'
This option is used to export the definitions of types. Except for not supporting data export, the description is the same as that of the
--tableoption. This option applies only to OceanBase Database Oracle mode.Note
Only OceanBase Database Oracle 2.2.77 and later versions support exporting type definitions.
--type-body 'typebody_name [, typebody_name...]' | --type-body '* '
This option is used to export the definitions of type bodies. Except for not supporting data export, the description is the same as that of the
--tableoption. This option applies only to OceanBase Database Oracle mode.Note
This option must be used with
--type. The exported type body files are saved in the type files.--package 'package_name [, package_name...]' | --package '*'
This option is used to export the definitions of packages. Except for not supporting data export, the description is the same as that of the
--tableoption. This option applies only to OceanBase Database Oracle mode.--package-body 'packagebody_name [, packagebody_name...]' | --package-body '*'
This option is used to export the definitions of package bodies. Except for not supporting data export, the description is the same as that of the
--tableoption. This option applies only to OceanBase Database Oracle mode.--function 'function_name [, function_name...]' | --function '*'
This option is used to export the definitions of functions. Except for not supporting data export, the description is the same as that of the
--tableoption.Note
All versions of OceanBase Database Oracle support exporting function definitions. OceanBase Database MySQL 2.2.30 and later versions support exporting function definitions.
--procedure 'procedure_name [, procedure_name...]' | --procedure '*'
This option is used to export the definitions of stored procedures. Except for not supporting data export, the description is the same as that of the
--tableoption.Note
All versions of OceanBase Database Oracle support exporting stored procedure definitions. OceanBase Database MySQL 2.2.30 and later versions support exporting stored procedure definitions.
File path
-f 'file_path', --file-path= 'file_path'
Specifies the absolute path on the local disk where data files are stored.
Note
Starting from OBDUMPER 4.2.7, you can specify
-fas a specific file name when you export a single file.- If you specify
--query-sql, the default file nameCUSTOM_SQLwill be replaced. - The
logdirectory will be generated in the parent directory of the path specified by-f.
- If you specify
--storage-uri 'storage_uri_string'
Specifies the uniform resource locator (URL) of the storage. Starting from OBDUMPER 4.2.0, you can export data to an Aliyun OSS bucket or an Amazon S3 bucket.
' storage_uri_string ' has the following syntax:
[scheme://host]path[?parameters] parameters: key[=value],...The following table describes the components in the syntax.
Component Description scheme The storage type. Valid values: Aliyun OSS/Amazon S3.
If the specified scheme is not an OSS or S3 bucket, an error is returned.host The name of the storage bucket.
When you export data to an OSS or S3 bucket, host specifies the bucket. For more information, see OSS Bucket.path The resource path of the storage bucket. The path must start with /.parameters The parameters required for the request.
Parameters can be a single key or a key-value pair.Example: Export data to an S3 bucket.
--storage-uri 's3://bucket/path?region={region}&access-key={accessKey}&secret-key={secretKey}'s3: the scheme is s3.bucket: the name of the S3 bucket.path: the resource path of the S3 bucket.?region={region}&access-key={accessKey}&secret-key={secretKey}: the values of the region, access-key, and secret-key parameters.
The following table describes the supported parameters.
Parameter Whether a value is required Description Supported storage types Supported versions endpoint Yes - Specifies the endpoint of the OSS bucket.
- Specifies the domain name endpoint of the S3 bucket.
- OSS
- S3
- 4.2.0
- 4.2.5
region Yes Specifies the physical location of the S3 bucket. S3 4.2.0 storage-class Yes Specifies the Amazon S3 storage class. S3 4.2.0 access-key Yes Specifies the access account of the storage. OSS/S3 4.2.0 secret-key Yes Specifies the access key of the storage. OSS/S3 4.2.0 Notice
- When you export the definitions of database objects and table data to an Aliyun OSS bucket, you must specify the endpoint, access-key, and secret-key parameters.
- When you export the definitions of database objects and table data to an Amazon S3 bucket, you must specify the region, access-key, and secret-key parameters.
--ctl-path 'control_path'
Specifies the absolute path on the local disk where the control file is stored. You can configure built-in processing functions in the control file. Before data export, the system will preprocess data based on the configured functions. For example: case conversion, null check, etc. For more information about the control file, see Data processing. When you specify this option in the command line, you must enclose the parameter value in single quotation marks. For example:
--ctl-path '/home/controls/'.--log-path 'log_path'
Specifies the output directory of the OBDUMPER running logs. If you do not specify this option, the OBDUMPER running logs are output to the directory specified by the
-foption by default. In most cases, you do not need to use redirection to output logs.--no-nested-dir
Exports data to a flat directory structure. All files are exported to the directory specified by
-for--storage-uri, and no subdirectories are created.
Other options
-H, --help
Displays the help information for the CLI tool.
-V, --version
Displays the version number of the current tool.
Advanced options
Feature options
Time stamp format
--flashback-timestamp 'timestamp_string'
Specifies the timestamp for flashback. This option can be used only with any data format option, and cannot be used with the
--query-sqloption. This option is applicable only to OceanBase Database in Oracle mode.--nls-date-format 'date-format-string'
Specifies the nls_date_format session variable in OceanBase Database in Oracle mode. This option does not specify the export format for DATE type data. Default value: YYYY-MM-DD HH24:MI:SS.
--nls-timestamp-format 'timestamp-format-string'
Specifies the nls_timestamp_format session variable in OceanBase Database in Oracle mode. This option does not specify the export format for TIMESTAMP type data. Default value: YYYY-MM-DD HH24:MI:SS:FF9.
--nls-timestamp-tz-format 'timestamp-tz-format-string'
Specifies the nls_timestamp_tz_format session variable in OceanBase Database in Oracle mode. This option does not specify the export format for TIMESTAMP WITH TIME ZONE type data. Default value: YYYY-MM-DD HH24:MI:SS:FF9 TZR.
--date-value-format
Specifies the export format for DATE type data. In OceanBase Database in MySQL mode, the default export format for DATE type data is yyyy-MM-dd. In OceanBase Database in Oracle mode, the default export format for DATE type data is yyyy-MM-dd HH:mm:ss.
Note
- This option can be used only with the
--csvor--cutoption. - In OceanBase Database in MySQL mode, this option does not support setting the export format for DATE type data when the value is zero.
- This option can be used only with the
--time-value-format
Specifies the export format for TIME type data. In OceanBase Database in MySQL mode, the default export format for TIME type data is HH:mm:ss. The precision value is consistent with the precision value defined in the table.
Note
- This option can be used only with the
--csvor--cutoption. - In OceanBase Database in MySQL mode, this option does not support setting the export format for TIME type data when the value is zero.
- This option can be used only with the
--datetime-value-format
Specifies the export format for DATETIME type data. In OceanBase Database in MySQL mode, the default export format for DATETIME type data is yyyy-MM-dd HH:mm:ss. The precision value is consistent with the precision value defined in the table.
Note
- This option can be used only with the
--csvor--cutoption. - In OceanBase Database in MySQL mode, this option does not support setting the export format for DATETIME type data when the value is zero.
- This option can be used only with the
--timestamp-value-format
Specifies the export format for TIMESTAMP type data. In OceanBase Database in MySQL or Oracle mode, the default export format for TIMESTAMP type data is yyyy-MM-dd HH:mm:ss.SSSSSS. The precision value is consistent with the precision value defined in the table.
Note
- This option can be used only with the
--csvor--cutoption. - In OceanBase Database in MySQL mode, this option does not support setting the export format for TIMESTAMP type data when the value is zero.
- This option can be used only with the
--timestamp-tz-value-format
Specifies the export format for TIMESTAMP WITH TIME ZONE type data. In OceanBase Database in Oracle mode, the default export format for TIMESTAMP WITH TIME ZONE type data is yyyy-MM-dd HH:mm:ss.SSSSSS. The precision value is consistent with the precision value defined in the table.
Note
This option can be used only with the
--csvor--cutoption.--timestamp-ltz-value-format
Specifies the export format for TIMESTAMP WITH LOCAL TIME ZONE type data. In OceanBase Database in Oracle mode, the default export format for TIMESTAMP WITH LOCAL TIME ZONE type data is yyyy-MM-dd HH:mm:ss. The precision value is consistent with the precision value defined in the table.
Note
This option can be used only with the
--csvor--cutoption.--preserve-zero-datetime
Specifies the original format of zero values of DATE, TIME, DATETIME, and TIMESTAMP types during export. If you specify this option, the values of non-nullable DATE, TIME, DATETIME, and TIMESTAMP columns that are
NULLare exported as0. The values of nullable DATE, TIME, DATETIME, and TIMESTAMP columns that areNULLare exported asNULL. This option supports setting the export format for DATE, DATETIME, and TIMESTAMP types in MySQL mode.
Allowlist- and blocklist-based filtering
Table-level filtering
--exclude-table 'table_name [, table_name...]'
Specifies tables to be excluded when exporting table definitions or data. Table names support pattern matching.
Example:
--exclude-table 'test1,test*,*test,te*st'The preceding parameter specifies the following tables to be excluded when exporting table definitions or data:
test1
All tables whose names start with test.
All tables whose names end with test.
All tables whose names start with te and end with st.
--exclude-data-types 'datatype [, datatype...]'
Specifies data types to be excluded when exporting data.
--add-extra-message
Specifies whether to export additional information in table definitions. For example, when you specify the
--add-extra-messageoption, the program exports the table group name of each table. By default, OBDUMPER does not export additional information in table definitions.Notice
When you specify the
--add-extra-messageoption, the program exports the table group name of each table. This option depends on the privileges of the sys tenant. If OBDUMPER does not have the privileges of the sys tenant, do not specify this option.--retain-empty-files
Specifies whether to generate an empty file when exporting an empty table. If you do not specify this option, no file is generated when exporting an empty table.
Column-level filtering
--include-column-names 'column_name [, column_name...]'
Specifies columns and their order to be exported.
--exclude-column-names 'column_name [, column_name...]'
Specifies columns to be excluded when exporting data. Column names do not support pattern matching.
Notice
The specified column names must match the case of the column names in the table definition.
--where 'where_condition_string'
Specifies data to be exported that meets the specified conditions. This option can be used only with any of the data format options, not with the
--query-sqloption.--partition 'partition_name [, partition_name...]'
Specifies partitions to be exported. The parameter value is the partition name, and multiple partition names are separated by commas. This option can be used only with any of the data format options, not with the
--query-sqloption.Notice
- When you specify partitions to be exported, for a subpartitioned table, you must specify the subpartition name. You cannot export data by using the partition name. For a subpartitioned table based on a template, the partition name is the partition name + s + subpartition name.
- When you specify the
--partitionoption to export data in a partition, for a composite partitioned table, you must specify the subpartition name. OBDUMPER cannot export data in the partition. If the specified partition name does not exist, OBDUMPER returns an error.
--query-sql 'select_statement'
Specifies a custom query statement to be exported. This option cannot be used with the
--partitionor--whereoption. You must ensure the correctness and performance of the custom query statement. If you export the result set of a large query statement, you may have to wait for a long time for the database to respond. If you need to preprocess data by using a control file during the export, you must specify the--tableand--ctl-pathoptions. The table name specified by the--tableoption must match the file name specified by the--ctl-pathoption in case. If you do not need to preprocess data, you can specify any table name for the--tableoption.--exclude-virtual-columns
Specifies whether to export generated columns (generated columns are exported by default).
--enable-hidden-pk
Specifies whether to use the hidden primary key
__pk_incrementfor tables without a primary key to improve the export speed. In OceanBase Database versions earlier than 4.0.0, you must use a special user to export data by specifying this option. Example:# In MySQL mode of OceanBase Database, create a special user and grant privileges to it as the root user. create user '__oceanbase_inner_drc_user'@'%' IDENTIFIED BY 'u*******'; grant ALL on *.* to '__oceanbase_inner_drc_user' WITH GRANT OPTION; # In Oracle mode of OceanBase Database, create a special user and grant privileges to it as the SYS user. create user '__OCEANBASE_INNER_DRC_USER'@'%' IDENTIFIED BY u*******; grant ALL to '__OCEANBASE_INNER_DRC_USER';--fetch-size 'int_num'
Specifies the number of rows to be read from the database cursor in Oracle mode of OceanBase Database. Default value: 1000. For more information, see OceanBase FetchSize.
Note
You must install the OceanBase JDBC driver.
Error handling
--retry
Specifies whether to continue the export task from the position where the previous export failed.
Notice
The dump.ckpt file is a checkpoint file generated during the tool run. The file is stored in the directory specified by the
-foption. If the dump.ckpt file does not exist, you cannot use this option.--weak-read
Specifies whether to export data from a standby replica. For more information about weak-consistency reads, see Weak-consistency reads.
--max-file-size int_num
Specifies the maximum amount of data that can be exported by a process. The export task is stopped when the exported data exceeds this value.
--skip-check-dir
Specifies whether to skip the check of whether the export data directory is empty. If the export directory is not empty, the export task is stopped.
Note
- If you do not specify this option, OBDUMPER checks whether the directory is empty. If the export directory is not empty, OBDUMPER returns an error and exits.
- If you specify this option, OBDUMPER skips the check of whether the directory is empty. However, the exported files may overwrite the data of files with the same name in the directory.
--remove-newline
Specifies whether to forcibly delete carriage return characters or line break characters from the exported data. For example, ***
\r***, ***\n***, or ***\r\n***. This option modifies only the data read into memory and does not modify the data in the source table. This option can be used only with the--cutoption.Notice
If the source table contains carriage return characters or line break characters, the exported data will be inconsistent with the source table data. Before you use this option, make sure that deleting
\r,\n, and\r\ncharacters will not affect your business. If you do not want to delete carriage return characters or line break characters from the data, do not specify this option in the command line to avoid data inconsistency.--snapshot
Specifies whether to export data of historical versions. This option can be used only with a data format option. Exporting data of historical versions ensures global consistency of the exported data. If you do not specify this option, the exported data may not be a globally consistent snapshot.
Performance options
--page-size int_num
Specifies the size of the task shard for OBDUMPER 4.0.0 and later. Default value: 1000000.
--thread int_num
Specifies the number of concurrent threads. This option directly corresponds to the number of export threads. The default value is
CPU multiplied by 2. If the CPU count exceeds 16, the maximum value is 32. When exporting the definitions of multiple database objects, we recommend that you set the value of the--threadoption to no more than 4. If the number of concurrent threads is too large, the tool may fail to access system tables in the sys tenant. In this case, a timeout error occurs during the export.--block-size
Specifies the threshold for splitting a file block. This option supports the LONG and STRING data types. If the size of the exported data file exceeds the threshold, other logical subfiles are generated sequentially. The unit of this option is MB by default. The default value is 1024 MB. This option does not take effect for the ORC and Parquet formats.
OBDUMPER V4.1.0 and later support splitting files based on the number of rows. The value of
--block-sizeis specified in MB or rows. For example,--block-size 256ROWspecifies that the size of a single file does not exceed 256 rows.--block-size 1024or--block-size 1024MBspecifies that the size of a single file does not exceed 1024 MB. The 1024M or 1GB format is not supported.--parallel-macro int_num
Specifies the number of macroblocks that a thread can process. Default value: 8.
Other options
--session-config
Specifies the connection configuration file. A default configuration file,
session.config.json, is provided in the<tool root directory>/conf/directory. You do not need to configure it. We recommend that you specify this option only when you want to use the same package to load multiple connection configurations.
Options
| Option | Required | Description | Version | Deprecated |
|---|---|---|---|---|
| -h(--host) | Yes | The IP address of the host to which you connect to the ODP or OceanBase physical node. | ||
| -P(--port) | Yes | The port of the host to which you connect to the ODP or OceanBase physical node. | ||
| -u(--user) | Yes | The username of the database user, the tenant name, and the cluster name. The format is: user@tenant#cluster. |
Yes | |
| -p(--password) | No | The password of the database user. | ||
| -D(--database) | Yes | The name of the database.
NoteOBDUMPER can export data of only one database at a time. |
||
| -f(--file-path) | Yes | The directory to which the data is exported. | ||
| --no-nested-dir | No | Specifies that no directory is exported. | 4.2.7 | |
| --sys-user | No | The username of the sys tenant. | ||
| --sys-password | No | The password of the sys tenant. | ||
| --public-cloud | No | The running environment of cloud databases of OceanBase. | ||
| --log-path | No | The directory to which the log file is exported. | ||
| --ddl | No | Exports a DDL file. A DDL file is a definition file of the exported database objects. The naming convention is object name-schema.sql. If you specify this option, only the definitions of the database objects are exported, and no data is exported. When you export the definitions of multiple table objects, we recommend that you set the value of the --thread option to no more than 4. Otherwise, the number of concurrent connections to the internal views of the sys tenant will be too large, which will cause a timeout error when you export data. |
||
| --csv | No | Exports data in CSV format. (Recommended) A CSV file stores data in standard CSV format. The naming convention is table name.csv. For more information about the CSV format, see the definition in RFC 4180. The most common delimiter is a single quotation mark or a double quotation mark. If the data contains a delimiter, you must escape it by specifying an escape character. We recommend that you use the CSV format. We recommend that you use this option with the --table option. If you use this option with the --all option, OBDUMPER exports only the data in the tables, and does not export the definitions of the database objects. |
||
| --sql | No | Exports data in SQL format. (Different from a DDL file) An SQL file stores data in INSERT statement format. The naming convention is table name.sql. Each line of data in the file corresponds to an executable INSERT statement. The content format of an SQL file is clearly different from that of a DDL file. We recommend that you use this option with the --table option. If you use this option with the --all option, OBDUMPER exports only the data in the tables, and does not export the definitions of the database objects. |
||
| --orc | No | Exports data in ORC format. An ORC file stores data in columnar format. The naming convention is table name.orc. For more information about the ORC format, see the definition in Apache ORC. |
4.0.0 | |
| --par | No | Exports data in Parquet format. A Parquet file stores data in columnar format. The naming convention is table name.parquet. For more information about the Parquet format, see the definition in Apache Parquet. |
V4.0.0 | |
| --cut | No | Exports data in CUT format. A CUT file stores data in string-separating format. The naming convention is table name.dat. We recommend that you use this option with the --table option. If you use this option with the --all option, OBDUMPER exports only the data in the tables, and does not export the definitions of the database objects.
NoticeIn CUT format, data is stored in rows. If the field separator is a single character, OBDUMPER escapes the separator, carriage return, or line break in the data. For example, if the data is |
||
| --all | No | Exports the definitions of all supported database objects and the data in all tables. | ||
| --table-group | No | Exports the definition of a table group. | 3.1.0 | |
| --table | No | Exports the definition or data of a table. | ||
| --view | No | Exports the definition of a view. | ||
| --function | No | Exports the definition of a function. | ||
| --procedure | No | Exports the definition of a stored procedure. | ||
| --trigger | No | Exports the definition of a trigger. | ||
| --sequence | No | Exports the definition of a sequence. | ||
| --synonym | No | Exports the definition of a synonym. (Not supported for MySQL tenants) | ||
| --type | No | Exports the definition of a type. | 4.0.0 | |
| --type-body | No | Exports the definition of a type body. | ||
| --package | No | Exports the definition of a package. | ||
| --package-body | No | Exports the definition of a package body. | ||
| --drop-object | No | When exporting DDL statements, adds the DROP statement at the beginning. This option is only used with the --ddl option. |
||
| --distinct | No | Exports non-repeating data from a table. | Yes | |
| --with-trim | No | Removes leading and trailing whitespace characters from data. | 4.2.0 | |
| --weak-read | No | Exports data from a standby replica. (Different from a standby cluster) | ||
| --query-sql | No | Exports the result set of a custom query SQL statement. | ||
| --snapshot | No | Exports data from the latest major compaction version. | ||
| --where | No | Exports data that meets the specified conditions. | ||
| --partition | No | Exports data from a specified partition. | ||
| --skip-header | No | Ignores the fields in the exported table for CSV format. | ||
| --trail-delimiter | No | Removes the last column delimiter at the end of a row. | ||
| --null-string | No | When the value of the current column is NULL, the value of the column is replaced with the specified string. Default value: \N. This option is only used with the --csv or --cut option. Default value: \N. |
||
| --empty-string | No | Replaces the empty character (' ') with the specified character. Default value: \E. This option is only used with the --csv or --cut option. Default value: \E. |
||
| --line-separator | No | Specifies the line separator. The default value varies with the system platform and can be one of the following: \r, \n, or \r\n. | ||
| --file-encoding | No | Specifies the file encoding. (Different from the database encoding) When specifying this option on the command line, enclose the parameter value in single quotes. For example: --file-encoding 'GBK'. Default value: UTF-8. |
||
| --column-separator | No | Specifies the column separator. This option supports only single-character separators and is only used with the --csv option. Default value: comma. (Different from the column separator string in CUT format) |
||
| --escape-character | No | Specifies the escape character. This option supports only single-character escape characters and can be used only with the --csv or --cut option. Default value: \.
NoteTo specify this option as a special (invisible) character, use the HEX representation. |
||
| --column-delimiter | No | Specifies the column delimiter. This option supports only single-character column delimiters and can be used only with the --csv option. Default value: single quote ('). |
||
| --column-splitter | No | Specifies the column separator string. (Different from the column delimiter in the CSV format) | ||
| --flashback-scn | No | Specifies the data to be exported after the flashback transaction point. This option can be used only with any data format option and cannot be used with the --query-sql option. |
||
| --flashback-timestamp | No | Specifies the data to be exported after the flashback timestamp. (Supported only in OceanBase Database Oracle mode 2.2.70 and later) | ||
| --nls-date-format | No | Sets the session-level date and time format. (Supported only in OceanBase Database Oracle mode) | ||
| --nls-timestamp-format | No | Sets the session-level timestamp format. (Supported only in OceanBase Database Oracle mode) | ||
| --nls-timestamp-tz-format | No | Sets the session-level timestamp format with time zone. (Supported only in OceanBase Database Oracle mode) | ||
| --retry | No | Exports data from the last savepoint. | ||
| --ctl-path | No | Specifies the directory where the control file is stored. | ||
| --exclude-table | No | Excludes the export of the specified table definition and table data. | ||
| --exclude-column-names | No | Excludes the export of data corresponding to the specified column names. | ||
| --exclude-data-types | No | Excludes the export of data corresponding to the specified data types. | ||
| --include-column-names | No | Exports data in the specified column order. | ||
| --remove-newline | No | Forces the removal of newline or carriage return characters from the data. (Applicable only to the CUT format) | ||
| --max-file-size | No | Sets the maximum amount of data that can be exported by a process. Unit: Byte. | ||
| --skip-check-dir | No | Skips checking whether the export directory is empty. (The export directory must be empty.) | ||
| --retain-empty-files | No | Generates an empty file when exporting an empty table. | ||
| --add-extra-message | No | Exports additional information such as table groups in the CREATE TABLE statement. | ||
| --page-size | No | The page size for query statements. Default value: 1000000. | ||
| --thread | No | The concurrency level of the export task. | ||
| --block-size | No | Specifies the file split size. Default value: 1024 MB. | ||
| --parallel-macro | No | Specifies the number of macroblocks processed by each export thread. | ||
| --fetch-size | No | Specifies the number of rows read from the database cursor each time in OceanBase Database Oracle mode. | 4.2.0 | |
| -V(--version) | No | Displays the version of the OBDUMPER tool. | ||
| --date-value-format | No | Sets the export format for DATE type. | 3.2.0 | |
| --time-value-format | No | Sets the export format for TIME type in OceanBase Database MySQL mode. | 3.2.0 | |
| --datetime-value-format | No | Sets the export format for DATETIME type in OceanBase Database MySQL mode. | 3.2.0 | |
| --timestamp-value-format | No | Specifies the export format of the TIMESTAMP type in OceanBase Database in MySQL or Oracle mode. | 3.2.0 | |
| --timestamp-tz-value-format | No | Specifies the export format of the TIMESTAMP WITH TIME ZONE type in OceanBase Database in Oracle mode. | 3.2.0 | |
| --timestamp-ltz-value-format | No | Specifies the export format of the TIMESTAMP WITH LOCAL TIME ZONE type in OceanBase Database in Oracle mode. | 3.2.0 | |
| --exclude-virtual-columns | No | Indicates whether to exclude the data of generated columns (the data of generated columns is exported by default). | 3.2.0 | |
| --no-sys | No | Indicates that the sys tenant password cannot be provided in the OceanBase Database environment. | 3.3.0 | |
| --logical-database | No | Indicates whether to connect to the ODP (Sharding) logical database for export. | 3.3.0 | |
| --storage-uri | No | Specifies the uniform resource locator (URL) of the storage. | 4.2.0 | |
| --character-set | No | Specifies the character set when creating a database connection. Default value: the value of the jdbc.url.character.encoding parameter in the session variables section of the session.properties file. The value specified by the --character-set option overrides the value of the jdbc.url.character.encoding parameter. The supported character sets include binary, gbk, gb18030, utf16, and utf8mb4. |
4.2.4 | |
| --preserve-zero-datetime | No | Indicates whether to preserve the original format of the zero value of the time type during export. | 4.2.4 | |
| --enable-hidden-pk | No | Use a hidden primary key for tables without a primary key. | 4.2.5 | |
| --session-config | No | Specifies the connection configuration file. | 4.2.6 | |
| --compact-schema | No | Export the table definition based on the result returned by SHOW CREATE TABLE.
NoteUsing this option may result in missing some table creation information, such as the primary zone. We recommend that you use this option only when performance issues occur. |
4.2.8 | |
| -H(--help) | No | View the help information of the OBDUMPER CLI tool. | ||