Documentation ¶
Overview ¶
Command dbdump saves contents of tables in a given MySQL database to per-table CSV files with optional gzip compression.
dbdump saves either specified or all database tables which are readable by the connected user; if only subset of table columns is readable, only these readable columns are saved.
By default program concurrenlty reads multiple tables over multiple connections (see -n flag), if consistency between dumped tables is required, use -tx flag to save them sequentially in a single transaction.
MySQL credentials (user and password) are read from the "client" section of the .my.cnf file which is expected to have the following format:
[client] user = username password = password
If -tls flag is used, program connects to the server over TLS and expects server certificate to be signed with certificate authority from the system CA pool. On UNIX systems the environment variables SSL_CERT_FILE and SSL_CERT_DIR can be used to override the system default locations for the SSL certificate file and SSL certificate files directory, respectively.
When running in concurrent mode, program only returns when all tables are processed reporting the first encountered error. When running in a single transaction mode (-tx flag), program terminates on the first error right away.
Only database, table and column names that can be used as unquoted MySQL identifiers are supported — they are only allowed to contain characters from [A-Za-z0-9_] range.
Null values are saved in CSV as NULL.