MySQL備份恢復之innobackupex選項解讀

innbackupex的選項解讀

[root@fuxi1 ~]# innobackupex --help

innobackupex [–compress](是否壓縮) [–compress-threads=NUMBER-OF-THREADS](用幾個線程去壓縮) [–compress-chunk-size=CHUNK-SIZE]
[–encrypt=ENCRYPTION-ALGORITHM](是否加密,加密的算法是什麼) [–encrypt-threads=NUMBER-OF-THREADS](加密線程的數量) [–encrypt-chunk-size=CHUNK-SIZE]
[–encrypt-key=LITERAL-ENCRYPTION-KEY] | [–encryption-key-file=MY.KEY]
[–include=REGEXP] [–user=NAME]
[–password=WORD] [–port=PORT] [–socket=SOCKET]
[–no-timestamp] (備份後是否生成有時間的目錄文件)[–ibbackup=IBBACKUP-BINARY]
[–slave-info] [–galera-info] [–stream=tar|xbstream]
[–defaults-file=MY.CNF] [–defaults-group=GROUP-NAME]
[–databases=LIST](備份指定的數據庫) [–no-lock]
[–tmpdir=DIRECTORY] [–tables-file=FILE]
[–history=NAME]
[–incremental] [–incremental-basedir] (使用增量)
[–incremental-dir] [–incremental-force-scan] [–incremental-lsn]
[–incremental-history-name=NAME] [–incremental-history-uuid=UUID]
[–close-files] [–compact](優化備份)
BACKUP-ROOT-DIR //備份的具體目錄

innobackupex --apply-log [–use-memory=B] //應用日誌
[–defaults-file=MY.CNF]
[–export] [–redo-only] [–ibbackup=IBBACKUP-BINARY]
BACKUP-DIR

innobackupex --copy-back [–defaults-file=MY.CNF] [–defaults-group=GROUP-NAME] BACKUP-DIR
//拷貝恢復,佔用大量的IO
innobackupex --move-back [–defaults-file=MY.CNF] [–defaults-group=GROUP-NAME] BACKUP-DIR //剪切恢復,恢復的較快

innobackupex [–decompress] [–decrypt=ENCRYPTION-ALGORITHM]
[–encrypt-key=LITERAL-ENCRYPTION-KEY] | [–encryption-key-file=MY.KEY]
[–parallel=NUMBER-OF-FORKS] BACKUP-DIR

–no-timestamp This option prevents creation of a time-stamped
subdirectory of the BACKUP-ROOT-DIR given on the command
line. When it is specified, the backup is done in
BACKUP-ROOT-DIR instead. //是否生成時間的文件

–kill-long-queries-timeout=#
This option specifies the number of seconds innobackupex
waits between starting FLUSH TABLES WITH READ LOCK and
killing those queries that block it. Default is 0
seconds, which means innobackupex will not attempt to
kill any queries. //殺死長時間的查詢

–rebuild-indexes This option only has effect when used together with the
–apply-log option and is passed directly to xtrabackup.
When used, makes xtrabackup rebuild all secondary indexes
after applying the log. This option is normally used to
prepare compact backups. See the XtraBackup manual for
more information. //開並行

–throttle=# This option specifies a number of I/O operations (pairs
of read+write) per second. It accepts an integer
argument. It is passed directly to xtrabackup’s
–throttle option. //限流

–incremental-basedir=name
This option specifies the directory containing the full
backup that is the base dataset for the incremental
backup. The option accepts a string argument. It is used
with the --incremental option. //增量備份的基礎 全備的位置
–incremental-dir=name
This option specifies the directory where the incremental
backup will be combined with the full backup to make a
new full backup. The option accepts a string argument.
It is used with the --incremental option. //增量備份到什麼位置

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章