mariadb-archiver for MariaDB Tools

Overview

The mariadb-archiver utility.

mariadb-archiver Options for MariaDB Tools

Option

Argument

Description

--analyze

string

Run ANALYZE TABLE afterwards on --source and/or -- dest

--ascend-first

Ascend only first column of index

--ask-pass

Prompt for a password when connecting to MariaDB

--buffer

Buffer output to --file and flush at commit

--bulk-delete

Delete each chunk with a single statement ( implies --commit-each)

--bulk-delete-limit

Add --limit to --bulk-delete statement (default yes). Disable using: --nobulk-delete-limit

--bulk-insert

Insert each chunk with LOAD DATA INFILE (implies -- bulk-delete --commit-each)

--channel

string

Channel name used when connected to a server using replication channels

--charset (-A)

string

Default character set

--check-charset

Ensure connection and table character sets are the same (default yes). Disable using: --nocheck-charset

--check-columns

Ensure --source and --dest have same columns ( default yes). Disable using: --nocheck-columns

--check-interval

time

If --check-slave-lag is given, this defines how long the tool pauses each time it discovers that a slave is lagging (default 1s). Optional suffix s= seconds, m=minutes, h=hours, d=days; if no suffix, s is used.

--check-slave-lag

string

Pause archiving until the specified DSN's slave lag is less than --max-lag

--columns (-c)

string

Comma-separated list of columns to archive

--commit-each

Commit each set of fetched and archived rows ( disables --txn-size)

--config

string

Read this comma-separated list of config files; if specified, this must be the first option on the command line

--database (-D)

string

Connect to this database

--delayed-insert

Add the DELAYED modifier to INSERT statements

--dest

DSN

DSN specifying the table to archive to

--dry-run

Print queries and exit without doing anything

--file

string

File to archive to, with DATE_FORMAT()-like formatting

--for-update

Adds the FOR UPDATE modifier to SELECT statements

--header

Print column header at top of --file

--help

Show help and exit

--high-priority-select

Adds the HIGH_PRIORITY modifier to SELECT statements

--host (-h)

string

Connect to host

--ignore

Use IGNORE for INSERT statements

--limit

integer

Number of rows to fetch and archive per statement ( default 1)

--local

Do not write OPTIMIZE or ANALYZE queries to binlog

--low-priority-delete

Adds the LOW_PRIORITY modifier to DELETE statements

--low-priority-insert

Adds the LOW_PRIORITY modifier to INSERT or REPLACE statements

--max-flow-ctl

float

Somewhat similar to --max-lag but for Galera clusters

--max-lag

time

Pause archiving if the slave given by --check- slave-lag lags (default 1s). Optional suffix s= seconds, m=minutes, h=hours, d=days; if no suffix, s is used.

--no-ascend

Do not use ascending index optimization

--no-delete

Do not delete archived rows

--optimize

string

Run OPTIMIZE TABLE afterwards on --source and/or -- dest

--output-format

string

Used with --file to specify the output format

--password (-p)

string

Password to use when connecting

--pid

string

Create the given PID file

--plugin

string

Perl module name to use as a generic plugin

--port (-P)

integer

Port number to use for connection

--primary-key-only

Primary key columns only

--progress

integer

Print progress information every X rows

--purge

Purge instead of archiving; allows omitting --file and --dest

--quick-delete

Adds the QUICK modifier to DELETE statements

--quiet (-q)

Do not print any output, such as for --statistics

--replace

Causes INSERTs into --dest to be written as REPLACE

--retries

integer

Number of retries per timeout or deadlock (default 1)

--run-time

time

Time to run before exiting. Optional suffix s= seconds, m=minutes, h=hours, d=days; if no suffix, s is used.

--safe-auto-increment

Do not archive row with max AUTO_INCREMENT ( default yes). Disable using: --nosafe-auto-increment

--sentinel

string

Exit if this file exists (default /tmp/mariadb- archiver-sentinel)

--set-vars

string

Set the MariaDB variables in this comma-separated list of variable=value pairs

--share-lock

Adds the LOCK IN SHARE MODE modifier to SELECT statements

--skip-foreign-key-checks

Disables foreign key checks with SET FOREIGN_KEY_CHECKS=0

--slave-password

string

Sets the password to be used to connect to the slaves

--slave-user

string

Sets the user to be used to connect to the slaves

--sleep

integer

Sleep time between fetches

--sleep-coef

float

Calculate --sleep as a multiple of the last SELECT time

--socket (-S)

string

Socket file to use for connection

--source

DSN

DSN specifying the table to archive from (required)

--statistics

Collect and print timing statistics

--stop

Stop running instances by creating the sentinel file

--txn-size

integer

Number of rows per transaction (default 1)

--user (-u)

string

User for login if not current user

--version

Show version and exit

--where

string

WHERE clause to limit which rows to archive ( required)

--why-quit

Print reason for exiting unless rows exhausted