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
- --protocol¶
The protocol to use for connection (tcp, socket)
- -C, --compress-protocol¶
Use compression on the MySQL connection
- --ssl¶
Connect using SSL
- --ssl-mode¶
Desired security state of the connection to the server: REQUIRED, 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 or functions
- --skip-constraints¶
Do not import constraints. By default, it imports contraints
- --skip-indexes¶
Do not import secondary index on InnoDB tables. By default, it import the indexes
- --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 unless SKIP is selected.
Options: AFTER_IMPORT_PER_TABLE, AFTER_IMPORT_ALL_TABLES and SKIP. Default: AFTER_IMPORT_PER_TABLE¶
- --no-schema¶
Do not import table schemas and triggers
- --purge-mode¶
This specify the truncate mode which can be: FAIL, NONE, DROP, TRUNCATE and DELETE. Default if not set: FAIL
- --disable-redo-log¶
Disables the REDO_LOG and enables it after, doesn’t check initial status
- --checksum¶
Treat checksums: skip, fail(default), warn.
- -o, --overwrite-tables¶
Drop tables if they already exist
- --overwrite-unsafe¶
Same as –overwrite-tables but starts data load as soon as possible. May cause InnoDB deadlocks for foreign keys.
- --retry-count¶
Lock wait timeout exceeded retry count, default 10 (currently only for DROP TABLE)
- --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
- --metadata-refresh-interval¶
Every this amount of tables the internal metadata will be refreshed. If the amount of tables you have in your metadata file is high, then you should increase this value. Default: 100
- --ignore-errors¶
Not increment error count and Warning instead of Critical in case of any of the comman separated error number list
- --set-gtid-purged¶
After import, it will execute the SET GLOBAL gtid_purged with the value found on source section of the metadata file
Threads Options¶
- --max-threads-per-table¶
Maximum number of threads per table to use, defaults to –threads
- --max-threads-for-index-creation¶
Maximum number of threads for index creation, default 4
- --max-threads-for-post-actions¶
Maximum number of threads for post action like: constraints, procedure, views and triggers, default 1
- --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
- --ignore-set¶
List of variables that will be ignored from the header of SET
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
- --fifodir¶
Directory where the FIFO files will be created when needed. Default: Same as backup
- -B, --database¶
An alternative database to restore into
- -Q, --quote-character¶
Identifier quote character used in INSERT statements. Posible values are: BACKTICK, bt, ` for backtick and DOUBLE_QUOTE, dt, “ for double quote. Default: detect from dump if possible, otherwise BACKTICK
- --show-warnings¶
If enabled, during INSERT IGNORE the warnings will be printed
- --resume¶
Expect to find resume file in backup dir and will only process those files
- -k, --kill-at-once¶
When Ctrl+c is pressed it immediately terminates the process
- -t, --threads¶
Number of threads to use, 0 means to use number of CPUs. Default: 4
- -V, --version¶
Show the program version and exit
- -v, --verbose¶
Verbosity of output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2
- --debug¶
Turn on debugging output (automatically sets verbosity to 3)
- --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
- --source-control-command¶
Instruct the proper commands to execute depending where are configuring the replication. Options: TRADITIONAL, AWS