Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Common parameters of xtrabackup

Shulou Source: shulou.com Published: 2022-06-01 04:01:21 09月30日 Update

Basic commands:

-- defaults-file: indicates the configuration file of the server. This parameter must be the first parameter of innobackupex, otherwise an error is reported.

-- host: indicates the host

-- user: indicates the user name of the backup

-- password: indicates the password of the backup user name

-- backup: indicates backup. This parameter can be ignored.

/ tmp/backup: directory of backup

-- backup: specified as backup

-- apply-log: indicates redo log

-- copy-back: indicates recovery

-- slave-info: back up the show slave status information of the slave library, which is only used when backing up the slave library.

-- no-lock: does not lock the table, only applies when the storage engine is innodb, and does not care about the use of backup location points

Incremental backup:

-- incremental: indicates incremental backup

-- incremental-basedir: indicates which backup this incremental backup is based on. Incremental backup is only applicable to innodb and xtradb engines.

-- redo-only: redo the log again, which is used during the recovery process of incremental backup

-- incremental-dir: indicates the directory of the incremental backup when restoring the incremental backup

Partial backup:

-- include: use regular expressions to back up the matching content; for example: backup the user table in the mysql library,-- include=' ^ mysql [.] user'

-- table-files: if you want to back up multiple tables, you can write multiple tables to a file in the form of "database name. table name", and specify this file when backing up

-- databases: you can back up the entire library or a table in the library, using "library name. Table name" when backing up the table.

-- export: use this option when using partial backups to restore, which is different from full and incremental backups

Advanced commands:

When xtrabackup performs a backup, it waits for the global lock to be acquired, which can lead to lock contention for statements that have been executed for a long time!

-- lock-wait-timeout: indicates the waiting time before executing flush tables with read lock. 0 means not waiting for the table lock command to be executed directly (in s). If there is a query that has been executed for a long time after the time set by this parameter, xtrabackup will stop running.

-- lock-wait-query-type: it can be set to all and update;. If set to all, it means to wait for all types of statements to be executed before executing flush tables with read lock;. If update is set, it means to wait for the completion of sql statement execution except select before performing table locking operations.

-- kill-long-queries-timeout: the number of seconds to wait after executing the flush tables with read lock

-- kill-long-query-type: if all and select; are all, all queries will be forcibly terminated if they exceed the number of seconds to wait. If select, all queries of select type can be forcibly terminated.

Tags: Backup increment parameter command file statement query multiple engine method log time user user name directory type part long-term mandatory advanced Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Information Docker Microsoft Shulou Tech Info