myloader Usage¶
Synopsis¶
myloader --directory
= /path/to/mydumper/backup [OPTIONS]
Description¶
myloader is a tool used for multi-threaded restoration of mydumper backups.
Options¶
The myloader tool has several available options:
Connection Options¶
-
-h
,
--host
¶
The host to connect to
-
-u
,
--user
¶
Username with the necessary privileges
-
-p
,
--password
¶
User password
-
-a
,
--ask-password
¶
Prompt For User password
-
-P
,
--port
¶
TCP/IP port to connect to
-
-S
,
--socket
¶
UNIX domain socket file to use for connection
-
-C
,
--compress-protocol
¶
Use compression on the MySQL connection
-
--ssl
¶
Connect using SSL
-
--ssl-mode
¶
Desired security state of the connection to the server: DISABLED, PREFERRED, REQUIRED, VERIFY_CA, VERIFY_IDENTITY
-
--key
¶
The path name to the key file
-
--cert
¶
The path name to the certificate file
-
--ca
¶
The path name to the certificate authority file
-
--capath
¶
The path name to a directory that contains trusted SSL CA certificates in PEM format
-
--cipher
¶
A list of permissible ciphers to use for SSL encryption
-
--tls-version
¶
Which protocols the server permits for encrypted connections
Filter Options¶
-
-x
,
--regex
¶
Regular expression for ‘db.table’ matching
-
-s
,
--source-db
¶
Database to restore
-
--skip-triggers
¶
Do not import triggers. By default, it imports triggers
-
--skip-post
¶
Do not import events, stored procedures and functions. By default, it imports events, stored procedures nor functions
-
--no-data
¶
Do not dump or import table data
-
-O
,
--omit-from-file
¶
File containing a list of database[.table] entries to skip, one per line (skips before applying regex option)
-
-T
,
--tables-list
¶
Comma delimited table list to dump (does not exclude regex option). Table name must include database name. For instance: test.t1,test.t2
PMM Options¶
-
--pmm-path
¶
which default value will be /usr/local/percona/pmm2/collectors/textfile-collector/high-resolution
-
--pmm-resolution
¶
which default will be high
Execution Options¶
-
-e
,
--enable-binlog
¶
Enable binary logging of the restore data
-
--innodb-optimize-keys
¶
Creates the table without the indexes and it adds them at the end. Options: AFTER_IMPORT_PER_TABLE and AFTER_IMPORT_ALL_TABLES. Default: AFTER_IMPORT_PER_TABLE
-
--purge-mode
¶
This specify the truncate mode which can be: NONE, DROP, TRUNCATE and DELETE
-
--disable-redo-log
¶
Disables the REDO_LOG and enables it after, doesn’t check initial status
-
-o
,
--overwrite-tables
¶
Drop tables if they already exist
-
--serialized-table-creation
¶
Table recreation will be executed in series, one thread at a time. This means –max-threads-for-schema-creation=1. This option will be removed in future releases
-
--stream
¶
It will receive the stream from STDIN and creates the file in the disk before start processing. Since v0.12.7-1, accepts NO_DELETE, NO_STREAM_AND_NO_DELETE and TRADITIONAL which is the default value and used if no parameter is given
Threads Options¶
-
--max-threads-per-table
¶
Maximum number of threads per table to use, default 4
-
--max-threads-per-table-hard
¶
Maximum hard number of threads per table to use, we are not going to use more than this amount of threads per table, default 4
-
--max-threads-for-index-creation
¶
Maximum number of threads for index creation, default 4
-
--max-threads-for-schema-creation
¶
Maximum number of threads for schema creation. When this is set to 1, is the same than –serialized-table-creation, default 4
-
--exec-per-thread
¶
Set the command that will receive by STDIN from the input file and write in the STDOUT
-
--exec-per-thread-extension
¶
Set the input file extension when –exec-per-thread is used. Otherwise it will be ignored
Statement Options¶
-
-r
,
--rows
¶
Split the INSERT statement into this many rows.
-
-q
,
--queries-per-transaction
¶
Number of queries per transaction, default 1000
-
--append-if-not-exist
¶
Appends IF NOT EXISTS to the create table statements. This will be removed when https://bugs.mysql.com/bug.php?id=103791 has been implemented
-
--set-names
¶
Sets the names, use it at your own risk, default binary
-
--skip-definer
¶
Removes DEFINER from the CREATE statement. By default, statements are not modified
Application Options¶
-
-?
,
--help
¶
Show help options
-
-d
,
--directory
¶
Directory of the dump to import
-
-L
,
--logfile
¶
Log file name to use, by default stdout is used
-
-B
,
--database
¶
An alternative database to restore into
-
--resume
¶
Expect to find resume file in backup dir and will only process those files
-
-t
,
--threads
¶
Number of threads to use, default 4
-
-V
,
--version
¶
Show the program version and exit
-
--identifier-quote-character
¶
This set the identifier quote character that is used to INSERT statements onlyon mydumper and to split statement on myloader. Use SQL_MODE to change theCREATE TABLE statementsPosible values are: BACKTICK and DOUBLE_QUOTE. Default: BACKTICK
-
-v
,
--verbose
¶
Verbosity of output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2
-
--defaults-file
¶
Use a specific defaults file. Default: /etc/mydumper.cnf
-
--defaults-extra-file
¶
Use an additional defaults file. This is loaded after –defaults-file, replacing previous defined values