Exporting data to the file system
where [connection options] are database connection options
[options]
: Command parameters:
-p PATH
or --path PATH
: Path to the DB directory whose objects are to be dumped or path to the table. By default, the DB root directory. The following will be dumped: all subdirectories whose names do not begin with a dot and tables whose names do not begin with a dot inside these subdirectories. To dump such tables or the contents of such directories, you can explicitly specify their names in this parameter.
--exclude STRING
: Pattern () for excluding paths from the export destination. This parameter can be specified several times for different patterns.
--scheme-only
: Only dump information about data schema objects and no data.
--consistency-level VAL
: Consistency level. Possible options:
- : Fully consistent export with a single snapshot taken before starting the export operation. Applied by default.
table
: Consistency within each table being dumped with separate independent snapshots taken for each such table. It can run faster and have less impact on handling the current DB load.
--avoid-copy
: Do not create a dump snapshot. The snapshot used by default to ensure consistency may not be applicable in some cases (such as for tables with external blobs).
The examples use a profile named db1
. For information about how to create it, see the Getting started with the YDB CLI article in the “Getting started “ section.
With a directory named automatically created in the current directory:
To the specified directory: