Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mydumper and myloader use parameter interpretation

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

$mydumper-help

Usage:

Mydumper [OPTION...] Multi-threaded MySQL dumping

Help Options:

-help Show help options.

Application Options:

-B,-- database # databases that need to be backed up, one database with one command backup, or all databases, including mysql.

-T,-- tables-list # tables to be backed up, separated by commas.

-o,-- outputdir # backup file directory.

-s,-- statement-size # generates the number of bytes of the insert statement. The default is 1000000. This parameter cannot be too small, otherwise it will be reported to Row bigger than statement_size for tools.t_serverinfo.

-r,-- rows # attempts to split the table with row blocks, and this parameter turns off-- chunk-filesize.

-F,-- chunk-filesize # the file size of the line block partition table, in MB.

-c,-- compress # compress the output file.

-e,-- build-empty-files # generates an empty file even if the table has no data.

-x,-- regex # regular expression matching, such as' db.table'.

-I,-- ignore-engines # ignored storage engine, separated by commas.

-m,-- no-schemas # does not export the table structure.

-d,-- no-data # does not export table data.

-G,-- triggers # export trigger.

-E,-- events # export event.

-R,-- routines # export stored procedure.

-k,-- no-locks # does not perform shared read locks, warning: this will result in inconsistent backups.

-- less-locking # reduced to the smallest lock on the innodb table.

-l,-- long-query-guard # sets a long query time. Default is 60 seconds. If the query time exceeds this time, an error will be reported: There are queries in PROCESSLIST running longer than 60s, aborting dump.

-K,-- kill-long-queries # kill dropped the long-executed query, backup error: Lock wait timeout exceeded; try restarting transaction.

-D,-- daemon # enables daemon mode.

-I,-- snapshot-interval # dump snapshot interval. Default is 60s, which needs to be in daemon mode.

-L,-- logfile # uses log files, default standard output to the terminal.

-- tz-utc # allows backup of Timestamp when backing up, which will cause problems with backup and restore in different time zones. It is turned off by default. Parameter:-- skip-tz-utc to disable.

-- skip-tz-utc

-- use-savepoints # uses SavePoint to record the lock information of metadata and requires SUPER permission.

-- success-on-1146 # Not increment error count and Warning instead of Critical in case of table doesn't exist.

-- lock-all-tables # locks all tables instead of FLUSH TABLE WITH READ LOCK.

U,-- updated-since # Use Update_time to dump only tables updated in the last U days.

-- trx-consistency-only # Transactional consistency only.

-h,-- host # The host to connect to

-u,-- user # Username with privileges to run the dump

-p,-- password # User password.

-P,-- port # TCP/IP port to connect to.

-S,-- socket # UNIX domain socket file to use for connection.

-t,-- the number of threads performed by threads # backup. Default is 4 threads.

-C,-- compress-protocol # uses a compression protocol on mysql connections.

-V,-- version # Show the program version and exit

-v,-- verbose # more output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2.

$myloader-help

Usage:

Myloader [OPTION...] Multi-threaded MySQL loader

Help Options:

-help Show help options.

Application Options:

-d,-- directory # the directory where the backup files are located.

-Q,-- queries-per-transaction # the number of query per transaction. Default is 1000.

-o,-- overwrite-tables # if the table exists, delete it first. Use this parameter to back up the table structure when you need to back up, otherwise the table will not be found.

-B,-- database # specifies the database to be restored.

-s,-- source-db # restored database.

-e,-- enable-binlog # enables binary logging to recover data.

-h,-- host # The host to connect to

-u,-- user # Username with privileges to run the dump

-p,-- password # User password.

-P,-- port # TCP/IP port to connect to.

-S,-- socket # UNIX domain socket file to use for connection.

-t,-- the number of threads used by threads #. Default is 4.

-C,-- compress-protocol # uses a compression protocol on the connection.

-V,-- version # Show the program version and exit

-v,-- verbose # more output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report