MySQL备份恢复之innobackupex选项解读

本文详细介绍了innobackupex工具的使用选项,包括压缩、加密、增量备份、恢复等关键参数。通过理解这些选项,用户能够更有效地进行MySQL数据库的备份与恢复操作,确保数据安全。
摘要由CSDN通过智能技术生成

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. //增量备份到什么位置

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值