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

Common parameters of xtrabackup

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

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.

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

Network Security

Wechat

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

12
Report