1. 添加源:
/etc/apt/sources.list.d/percona-release.list
vim /etc/apt/sources.list.d/percona-release.list
=========================================================================================================================================================
deb http://repo.percona.com/apt VERSION main testing
deb-src http://repo.percona.com/apt VERSION main testing
deb http://repo.percona.com/apt jessie main testing
deb-src http://repo.percona.com/apt jessie main testing
===========================================================================================================================================================
2. 更新源:
apt-get update
root@rabbitmq-02:/etc/apt/sources.list.d# apt-get update
忽略:1 http://repo.percona.com/apt VERSION InRelease
命中:2 http://mirrors.aliyun.com/ubuntu bionic InRelease
获取:3 http://repo.percona.com/apt jessie InRelease [15.9 kB]
命中:4 http://mirrors.aliyun.com/ubuntu bionic-security InRelease
命中:5 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
命中:6 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease
命中:7 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
获取:8 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy InRelease [5,182 B]
错误:9 http://repo.percona.com/apt VERSION Release
404 Not Found [IP: 147.135.54.159 80]
获取:10 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy InRelease [5,182 B]
获取:11 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy InRelease [5,182 B]
错误:3 http://repo.percona.com/apt jessie InRelease
由于没有公钥,无法验证下列签名: NO_PUBKEY 9334A25F8507EFA5
忽略:12 https://packages.erlang-solutions.com/ubuntu focal InRelease
获取:13 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main amd64 Packages [94.0 kB]
命中:14 https://packages.erlang-solutions.com/ubuntu focal Release
忽略:15 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
获取:16 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main amd64 Packages [15.1 kB]
获取:17 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy InRelease [5,182 B]
获取:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages [16.9 kB]
忽略:21 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
忽略:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
获取:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages [15.1 kB]
忽略:15 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
忽略:21 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
忽略:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
忽略:15 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
忽略:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
忽略:21 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
错误:15 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
404 Not Found [IP: 172.67.140.63 443]
忽略:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
错误:21 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
404 Not Found [IP: 172.67.140.63 443]
忽略:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
忽略:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
错误:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
404 Not Found [IP: 104.21.27.7 443]
错误:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
404 Not Found [IP: 104.21.27.7 443]
正在读取软件包列表... 完成
E: 仓库 “http://repo.percona.com/apt VERSION Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
W: GPG 错误:http://repo.percona.com/apt jessie InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 9334A25F8507EFA5
E: 仓库 “http://repo.percona.com/apt jessie InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
root@rabbitmq-02:/etc/apt/sources.list.d#
3. 更新依赖源: 用apt --fix-broken install这条命令来修复系统的依赖关系
apt --fix-broken install
root@rabbitmq-02:/etc/apt/sources.list.d# apt --fix-broken install
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在修复依赖关系... 完成
下列软件包是自动安装的并且现在不需要了:
cracklib-runtime dc evince-common gedit-common gir1.2-gtksource-4 gir1.2-totem-1.0 gir1.2-totemplparser-1.0 gnome-themes-extra gnome-themes-extra-data gnome-todo-common
grilo-plugins-0.3-base gtk2-engines-pixbuf guile-2.2-libs libabw-0.1-1 libamtk-5-0 libamtk-5-common libboost-date-time1.71.0 libboost-filesystem1.71.0 libboost-iostreams1.71.0
libboost-locale1.71.0 libclucene-contribs1v5 libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libcrack2 libdjvulibre-text libdjvulibre21 libe-book-0.1-1 libeot0 libepubgen-0.1-1
libetonyek-0.1-1 libexttextcat-2.0-0 libffi6 libfreehand-0.1-1 libgc1c2 libgnome-todo libgoa-backend-1.0-1 libgom-1.0-0 libgpgmepp6 libgspell-1-2 libgspell-1-common
libgtop-2.0-11 libgtop2-common libjuh-java libjurt-java liblua5.3-0 libmediaart-2.0-0 libmhash2 libmspub-0.1-1 libmwaw-0.3-3 libmythes-1.2-0 libneon27-gnutls libodfgen-0.1-1
liborcus-0.15-0 libpagemaker-0.0-0 libpwquality-common libpwquality1 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libqqwing2v5 libraptor2-0 librasqal3 librdf0
libreadline7 librevenge-0.0-0 libridl-java libsctp1 libspectre1 libsuitesparseconfig5 libsynctex2 libsysmetrics1 libtotem0 libunoloader-java libvisio-0.1-1 libwpd-0.10-10
libwpg-0.3-3 libwps-0.4-4 libwxbase3.0-0v5 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-xv0 libyajl2 lp-solve mscompress printer-driver-foo2zjs-common python
python-minimal python2.7 python2.7-minimal shotwell-common totem-common
使用'apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
libcurl4-openssl-dev
建议安装:
libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev libssl-dev zlib1g-dev
下列【新】软件包将被安装:
libcurl4-openssl-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 11 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
需要下载 303 kB 的归档。
解压缩后会消耗 1,433 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libcurl4-openssl-dev amd64 7.58.0-2ubuntu3.24 [303 kB]
已下载 303 kB,耗时 1秒 (368 kB/s)
正在选中未选择的软件包 libcurl4-openssl-dev:amd64。
(正在读取数据库 ... 系统当前共安装有 184440 个文件和目录。)
准备解压 .../libcurl4-openssl-dev_7.58.0-2ubuntu3.24_amd64.deb ...
进度:[ 0%] [.................................................................................................................................................................]
正在解压 libcurl4-openssl-dev:amd64 (7.58.0-2ubuntu3.24) ......................................................................................................................]
正在设置 libcurl4-openssl-dev:amd64 (7.58.0-2ubuntu3.24) ......................................................................................................................]
进度:[ 43%] [#####################################################################............................................................................................]
正在设置 percona-xtrabackup-24 (2.4.29-1.focal) ...######################################################......................................................................]
进度:[ 71%] [###################################################################################################################..............................................]
正在处理用于 man-db (2.9.1-1) 的触发器 ...##############################################################################################################.......................]
root@rabbitmq-02:/etc/apt/sources.list.d#
root@rabbitmq-02:/etc/apt/sources.list.d#
root@rabbitmq-02:/etc/apt/sources.list.d# apt-get install percona-xtrabackup-24
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
percona-xtrabackup-24 已经是最新版 (2.4.29-1.focal)。
下列软件包是自动安装的并且现在不需要了:
cracklib-runtime dc evince-common gedit-common gir1.2-gtksource-4 gir1.2-totem-1.0 gir1.2-totemplparser-1.0 gnome-themes-extra gnome-themes-extra-data gnome-todo-common
grilo-plugins-0.3-base gtk2-engines-pixbuf guile-2.2-libs libabw-0.1-1 libamtk-5-0 libamtk-5-common libboost-date-time1.71.0 libboost-filesystem1.71.0 libboost-iostreams1.71.0
libboost-locale1.71.0 libclucene-contribs1v5 libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libcrack2 libdjvulibre-text libdjvulibre21 libe-book-0.1-1 libeot0 libepubgen-0.1-1
libetonyek-0.1-1 libexttextcat-2.0-0 libffi6 libfreehand-0.1-1 libgc1c2 libgnome-todo libgoa-backend-1.0-1 libgom-1.0-0 libgpgmepp6 libgspell-1-2 libgspell-1-common
libgtop-2.0-11 libgtop2-common libjuh-java libjurt-java liblua5.3-0 libmediaart-2.0-0 libmhash2 libmspub-0.1-1 libmwaw-0.3-3 libmythes-1.2-0 libneon27-gnutls libodfgen-0.1-1
liborcus-0.15-0 libpagemaker-0.0-0 libpwquality-common libpwquality1 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libqqwing2v5 libraptor2-0 librasqal3 librdf0
libreadline7 librevenge-0.0-0 libridl-java libsctp1 libspectre1 libsuitesparseconfig5 libsynctex2 libsysmetrics1 libtotem0 libunoloader-java libvisio-0.1-1 libwpd-0.10-10
libwpg-0.3-3 libwps-0.4-4 libwxbase3.0-0v5 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-xv0 libyajl2 lp-solve mscompress printer-driver-foo2zjs-common python
python-minimal python2.7 python2.7-minimal shotwell-common totem-common
使用'apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 11 个软件包未被升级。
root@rabbitmq-02:/etc/apt/sources.list.d#
4. 查看是否安装:
dpkg -l | grep percona-xtrabackup
5. 安装2.4软件包:
sudo apt-get install percona-xtrabackup-24
dpkg -i percona-xtrabackup-24_2.4.29-1.focal_amd64.deb
root@rabbitmq-02:/home# dpkg -i percona-xtrabackup-24_2.4.29-1.focal_amd64.deb
正在选中未选择的软件包 percona-xtrabackup-24。
(正在读取数据库 ... 系统当前共安装有 184453 个文件和目录。)
准备解压 percona-xtrabackup-24_2.4.29-1.focal_amd64.deb ...
正在解压 percona-xtrabackup-24 (2.4.29-1.focal) ...
正在设置 percona-xtrabackup-24 (2.4.29-1.focal) ...
正在处理用于 man-db (2.9.1-1) 的触发器 ...
root@rabbitmq-02:/home#
查看安装版本:
xtrabackup --v
root@rabbitmq-02:/etc/apt/sources.list.d# xtrabackup --v
xtrabackup: recognized server arguments: --datadir=/home/mysql/data --tmpdir=/tmp --server-id=67 --log_bin=master-bin
xtrabackup: recognized client arguments:
xtrabackup version 2.4.29 based on MySQL server 5.7.44 Linux (x86_64) (revision id: 2e6c0951)
Open source backup tool for InnoDB and XtraDB
Copyright (C) 2009-2017 Percona LLC and/or its affiliates.
Portions Copyright (C) 2000, 2011, MySQL AB & Innobase Oy. All Rights Reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation version 2
of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You can download full text of the license on http://www.gnu.org/licenses/gpl-2.0.txt
Usage: [xtrabackup [--defaults-file=#] --backup | xtrabackup [--defaults-file=#] --prepare] [OPTIONS]
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
The following groups are read: xtrabackup mysqld
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file,
except for login file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=#
Also read groups with concat(group, suffix)
--login-path=# Read this path from the login file.
-v, --version print xtrabackup version information
--target-dir=name destination directory
--backup take backup to target-dir
--stats calc statistic of datadir (offline mysqld is recommended)
--prepare prepare a backup for starting mysql server on the backup.
--export create files to import to another database when prepare.
--apply-log-only stop recovery process not to progress LSN after applying
log when prepare.
--print-param print parameter of mysqld needed for copyback.
--use-memory=# The value is used instead of buffer_pool_size
--throttle=# limit count of IO operations (pairs of read&write) per
second to IOS values (for '--backup')
--log[=name] Ignored option for MySQL option compatibility
--log-copy-interval=#
time interval between checks done by log copying thread
in milliseconds (default is 1 second).
--extra-lsndir=name (for --backup): save an extra copy of the
xtrabackup_checkpoints file in this directory.
--incremental-lsn=name
(for --backup): copy only .ibd pages newer than specified
LSN 'high:low'. ##ATTENTION##: If a wrong LSN value is
specified, it is impossible to diagnose this, causing the
backup to be unusable. Be careful!
--incremental-basedir=name
(for --backup): copy only .ibd pages newer than backup at
specified directory.
--incremental-dir=name
(for --prepare): apply .delta files and logfile in the
specified directory.
--to-archived-lsn=# Don't apply archived logs with bigger log sequence
number.
--tables=name filtering by regexp for table names.
--tables-file=name filtering by list of the exact database.table name in the
file.
--databases=name filtering by list of databases.
--databases-file=name
filtering by list of databases in the file.
--tables-exclude=name
filtering by regexp for table names. Operates the same
way as --tables, but matched names are excluded from
backup. Note that this option has a higher priority than
--tables.
--databases-exclude=name
Excluding databases based on name, Operates the same way
as --databases, but matched names are excluded from
backup. Note that this option has a higher priority than
--databases.
--create-ib-logfile ** not work for now** creates ib_logfile* also after
'--prepare'. ### If you want create ib_logfile*, only
re-execute this command in same options. ###
--stream=name Stream all backup files to the standard output in the
specified format. Currently supported formats are 'tar'
and 'xbstream'.
--compress[=name] Compress individual backup files using the specified
compression algorithm. Currently the only supported
algorithm is 'quicklz'. It is also the default algorithm,
i.e. the one used when --compress is used without an
argument.
--compress-threads=#
Number of threads for parallel data compression. The
default value is 1.
--compress-chunk-size=#
Size of working buffer(s) for compression threads in
bytes. The default value is 64K.
--encrypt=name Encrypt individual backup files using the specified
encryption algorithm.
--encrypt-key=name Encryption key to use.
--encrypt-key-file=name
File which contains encryption key to use.
--encrypt-threads=# Number of threads for parallel data encryption. The
default value is 1.
--encrypt-chunk-size=#
Size of working buffer(S) for encryption threads in
bytes. The default value is 64K.
--compact Create a compact backup by skipping secondary index
pages.
--rebuild-indexes Rebuild secondary indexes in InnoDB tables after applying
the log. Only has effect with --prepare.
--rebuild-threads=# Use this number of threads to rebuild indexes in a
compact backup. Only has effect with --prepare and
--rebuild-indexes.
--incremental-force-scan
Perform a full-scan incremental backup even in the
presence of changed page bitmap data
--close-files do not keep files opened. Use at your own risk.
--core-file Write core on fatal signals
--copy-back Copy all the files in a previously made backup from the
backup directory to their original locations.
--move-back Move all the files in a previously made backup from the
backup directory to the actual datadir location. Use with
caution, as it removes backup files.
--galera-info This options creates the xtrabackup_galera_info file
which contains the local node state at the time of the
backup. Option should be used when performing the backup
of Percona-XtraDB-Cluster. Has no effect when backup
locks are used to create the backup.
--slave-info This option is useful when backing up a replication slave
server. It prints the binary log position and name of the
master server. It also writes this information to the
"xtrabackup_slave_info" file as a "CHANGE MASTER"
command. A new slave for this master can be set up by
starting a slave server on this backup and issuing a
"CHANGE MASTER" command with the binary log position
saved in the "xtrabackup_slave_info" file.
--no-lock Use this option to disable table lock with "FLUSH TABLES
WITH READ LOCK". Use it only if ALL your tables are
InnoDB and you DO NOT CARE about the binary log position
of the backup. This option shouldn't be used if there are
any DDL statements being executed or if any updates are
happening on non-InnoDB tables (this includes the system
MyISAM tables in the mysql database), otherwise it could
lead to an inconsistent backup. If you are considering to
use --no-lock because your backups are failing to acquire
the lock, this could be because of incoming replication
events preventing the lock from succeeding. Please try
using --safe-slave-backup to momentarily stop the
replication slave thread, this may help the backup to
succeed and you then don't need to resort to using this
option.
--lock-ddl Issue LOCK TABLES FOR BACKUP if it is supported by server
at the beginning of the backup to block all DDL
operations.
--lock-ddl-timeout=#
If LOCK TABLES FOR BACKUP does not return within given
timeout, abort the backup.
--lock-ddl-per-table
Lock DDL for each table before xtrabackup starts the copy
phase and until the backup is completed.
--backup-lock-timeout=#
Timeout in seconds for attempts to acquire metadata
locks.
--backup-lock-retry-count=#
Number of attempts to acquire metadata locks.
--dump-innodb-buffer-pool
Instruct MySQL server to dump innodb buffer pool by
issuing a SET GLOBAL innodb_buffer_pool_dump_now=ON
--dump-innodb-buffer-pool-timeout=#
This option specifies the number of seconds xtrabackup
waits for innodb buffer pool dump to complete
--dump-innodb-buffer-pool-pct=#
This option specifies the percentage of buffer pool to be
dumped
--safe-slave-backup Stop slave SQL thread and wait to start backup until
Slave_open_temp_tables in "SHOW STATUS" is zero. If there
are no open temporary tables, the backup will take place,
otherwise the SQL thread will be started and stopped
until there are no open temporary tables. The backup will
fail if Slave_open_temp_tables does not become zero after
--safe-slave-backup-timeout seconds. The slave SQL thread
will be restarted when the backup finishes.
--rsync Uses the rsync utility to optimize local file transfers.
When this option is specified, innobackupex uses rsync to
copy all non-InnoDB files instead of spawning a separate
cp for each file, which can be much faster for servers
with a large number of databases or tables. This option
cannot be used together with --stream.
--force-non-empty-directories
This option, when specified, makes --copy-back or
--move-back transfer files to non-empty directories. Note
that no existing files will be overwritten. If
--copy-back or --nove-back has to copy a file from the
backup directory which already exists in the destination
directory, it will still fail with an error.
--no-version-check This option disables the version check which is enabled
by the --version-check option.
--tables-compatibility-check
This option enables engine compatibility warning.
(Defaults to on; use --skip-tables-compatibility-check to disable.)
--no-backup-locks This option controls if backup locks should be used
instead of FLUSH TABLES WITH READ LOCK on the backup
stage. The option has no effect when backup locks are not
supported by the server. This option is enabled by
default, disable with --no-backup-locks.
--decompress Decompresses all files with the .qp extension in a backup
previously made with the --compress option.
-u, --user=name This option specifies the MySQL username used when
connecting to the server, if that's not the current user.
The option accepts a string argument. See mysql --help
for details.
-H, --host=name This option specifies the host to use when connecting to
the database server with TCP/IP. The option accepts a
string argument. See mysql --help for details.
-P, --port=# This option specifies the port to use when connecting to
the database server with TCP/IP. The option accepts a
string argument. See mysql --help for details.
-p, --password[=name]
This option specifies the password to use when connecting
to the database. It accepts a string argument. See mysql
--help for details.
-S, --socket=name This option specifies the socket to use when connecting
to the local database server with a UNIX domain socket.
The option accepts a string argument. See mysql --help
for details.
--incremental-history-name=name
This option specifies the name of the backup series
stored in the PERCONA_SCHEMA.xtrabackup_history history
record to base an incremental backup on. Xtrabackup will
search the history table looking for the most recent
(highest innodb_to_lsn), successful backup in the series
and take the to_lsn value to use as the starting lsn for
the incremental backup. This will be mutually exclusive
with --incremental-history-uuid, --incremental-basedir
and --incremental-lsn. If no valid lsn can be found (no
series by that name, no successful backups by that name)
xtrabackup will return with an error. It is used with the
--incremental option.
--incremental-history-uuid=name
This option specifies the UUID of the specific history
record stored in the PERCONA_SCHEMA.xtrabackup_history to
base an incremental backup on.
--incremental-history-name, --incremental-basedir and
--incremental-lsn. If no valid lsn can be found (no
success record with that uuid) xtrabackup will return
with an error. It is used with the --incremental option.
--decrypt=name Decrypts all files with the .xbcrypt extension in a
backup previously made with --encrypt option.
--remove-original Remove .qp and .xbcrypt files after decryption and
decompression.
--ftwrl-wait-query-type=name
This option specifies which types of queries are allowed
to complete before innobackupex will issue the global
lock. Default is all.
--kill-long-query-type=name
This option specifies which types of queries should be
killed to unblock the global lock. Default is "SELECT".
--history[=name] This option enables the tracking of backup history in the
PERCONA_SCHEMA.xtrabackup_history table. An optional
history series name may be specified that will be placed
with the history record for the current backup being
taken.
--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.
--ftwrl-wait-timeout=#
This option specifies time in seconds that innobackupex
should wait for queries that would block FTWRL before
running it. If there are still such queries when the
timeout expires, innobackupex terminates with an error.
Default is 0, in which case innobackupex does not wait
for queries to complete and starts FTWRL immediately.
--ftwrl-wait-threshold=#
This option specifies the query run time threshold which
is used by innobackupex to detect long-running queries
with a non-zero value of --ftwrl-wait-timeout. FTWRL is
not started until such long-running queries exist. This
option has no effect if --ftwrl-wait-timeout is 0.
Default value is 60 seconds.
--debug-sleep-before-unlock=#
This is a debug-only option used by the XtraBackup test
suite.
--safe-slave-backup-timeout=#
How many seconds --safe-slave-backup should wait for
Slave_open_temp_tables to become zero. (default 300)
--binlog-info[=name]
This option controls how XtraBackup should retrieve
server's binary log coordinates corresponding to the
backup. Possible values are OFF, ON, LOCKLESS and AUTO.
See the XtraBackup manual for more information
--reencrypt-for-server-id=#
Re-encrypt tablespace keys for given server-id.
--check-privileges Check database user privileges before performing any
query.
--read-buffer-size[=#]
Set datafile read buffer size, given value is scaled up
to page size. Default is 10Mb.
--ssl-mode=name SSL connection mode.
--ssl Deprecated. Use --ssl-mode instead.
(Defaults to on; use --skip-ssl to disable.)
--ssl-verify-server-cert
Deprecated. Use --ssl-mode=VERIFY_IDENTITY instead.
--ssl-ca=name CA file in PEM format.
--ssl-capath=name CA directory.
--ssl-cert=name X509 cert in PEM format.
--ssl-cipher=name SSL cipher to use.
--ssl-key=name X509 key in PEM format.
--ssl-crl=name Certificate revocation list.
--ssl-crlpath=name Certificate revocation list path.
--tls-version=name TLS version to use, permitted values are: TLSv1, TLSv1.1,
TLSv1.2
--server-public-key-path=name
File path to the server public RSA key in PEM format.
-h, --datadir=name Path to the database root.
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
separated by a colon (:), in this case they are used in a
round-robin fashion.
--parallel=# Number of threads to use for parallel datafiles transfer.
The default value is 1.
--log[=name] Ignored option for MySQL option compatibility
--log-bin[=name] Base name for the log sequence
--innodb[=name] Ignored option for MySQL option compatibility
--innodb-adaptive-hash-index
Enable InnoDB adaptive hash index (enabled by default).
Disable with --skip-innodb-adaptive-hash-index.
(Defaults to on; use --skip-innodb-adaptive-hash-index to disable.)
--innodb-autoextend-increment=#
Data file autoextend increment in megabytes
--innodb-buffer-pool-size=#
The size of the memory buffer InnoDB uses to cache data
and indexes of its tables.
--innodb-checksums Enable InnoDB checksums validation (enabled by default).
Disable with --skip-innodb-checksums.
(Defaults to on; use --skip-innodb-checksums to disable.)
--innodb-data-file-path=name
Path to individual files and their sizes.
--innodb-data-home-dir=name
The common part for InnoDB table spaces.
--innodb-doublewrite
Enable InnoDB doublewrite buffer (enabled by default).
Disable with --skip-innodb-doublewrite.
(Defaults to on; use --skip-innodb-doublewrite to disable.)
--innodb-io-capacity[=#]
Number of IOPs the server can do. Tunes the background IO
rate
--innodb-file-io-threads=#
Number of file I/O threads in InnoDB.
--innodb-read-io-threads=#
Number of background read I/O threads in InnoDB.
--innodb-write-io-threads=#
Number of background write I/O threads in InnoDB.
--innodb-file-per-table
Stores each InnoDB table to an .ibd file in the database
dir.
--innodb-flush-log-at-trx-commit[=#]
Set to 0 (write and flush once per second), 1 (write and
flush at each commit) or 2 (write at commit, flush once
per second).
--innodb-flush-method=name
With which method to flush data.
--innodb-force-recovery=#
Helps to save your data in case the disk image of the
database becomes corrupt.
--innodb-log-arch-dir=name
Where full logs should be archived.
--innodb-log-buffer-size=#
The size of the buffer which InnoDB uses to write log to
the log files on disk.
--innodb-log-file-size=#
Size of each log file in a log group.
--innodb-log-files-in-group=#
Number of log files in the log group. InnoDB writes to
the files in a circular fashion. Value 3 is recommended
here.
--innodb-log-group-home-dir=name
Path to InnoDB log files.
--innodb-max-dirty-pages-pct=#
Percentage of dirty pages allowed in bufferpool.
--innodb-open-files=#
How many files at the maximum InnoDB keeps open at the
same time.
--innodb-use-native-aio
Use native AIO if supported on this platform.
--innodb-page-size=#
The universal page size of the database.
--innodb-log-block-size=#
The log block size of the transaction log file. Changing
for created log file is not supported. Use on your own
risk!
--innodb-fast-checksum
Change the algorithm of checksum for the whole of
datapage to 4-bytes word based.
--innodb-doublewrite-file=name
Path to special datafile for doublewrite buffer. (default
is : not used)
--innodb-buffer-pool-filename=name
Filename to/from which to dump/load the InnoDB buffer
pool
--debug-sync=name Debug sync point. This is only used by the xtrabackup
test suite
-#, --debug[=name] Output debug log. Default all ib_log output to stderr. To
redirect all ib_log output to separate file, use
--debug=d,ib_log:o,/tmp/xtrabackup.trace
--innodb-checksum-algorithm=name
The algorithm InnoDB uses for page checksumming. [CRC32,
STRICT_CRC32, INNODB, STRICT_INNODB, NONE, STRICT_NONE]
--innodb-log-checksum-algorithm=name
The algorithm InnoDB uses for log checksumming. [CRC32,
STRICT_CRC32, INNODB, STRICT_INNODB, NONE, STRICT_NONE]
--innodb-undo-directory=name
Directory where undo tablespace files live, this path can
be absolute.
--innodb-undo-tablespaces=#
Number of undo tablespaces to use.
--defaults-group=name
defaults group in config file (default "mysqld").
--open-files-limit=#
the maximum number of file descriptors to reserve with
setrlimit().
--redo-log-version=#
Redo log version of the backup. For --prepare only.
--server-id=# The server instance being backed up
--transition-key[=name]
Transition key to encrypt tablespace keys with.
--xtrabackup-plugin-dir=name
Directory for xtrabackup plugins.
--generate-new-master-key
Generate new master key when doing copy-back.
--generate-transition-key
Generate transition key and store it into keyring.
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
datadir /home/mysql/data
tmpdir /tmp
parallel 1
log (No default value)
log-bin master-bin
innodb (No default value)
innodb-adaptive-hash-index TRUE
innodb-autoextend-increment 8
innodb-buffer-pool-size 8388608
innodb-checksums TRUE
innodb-data-file-path (No default value)
innodb-data-home-dir (No default value)
innodb-doublewrite TRUE
innodb-io-capacity 200
innodb-file-io-threads 4
innodb-read-io-threads 4
innodb-write-io-threads 4
innodb-file-per-table FALSE
innodb-flush-log-at-trx-commit 1
innodb-flush-method (No default value)
innodb-force-recovery 0
innodb-log-arch-dir (No default value)
innodb-log-buffer-size 16777216
innodb-log-file-size 50331648
innodb-log-files-in-group 2
innodb-log-group-home-dir (No default value)
innodb-max-dirty-pages-pct 75
innodb-open-files 300
innodb-use-native-aio FALSE
innodb-page-size 16384
innodb-log-block-size 512
innodb-fast-checksum FALSE
innodb-doublewrite-file (No default value)
innodb-buffer-pool-filename (No default value)
debug-sync (No default value)
debug (No default value)
innodb-checksum-algorithm innodb
innodb-log-checksum-algorithm innodb
innodb-undo-directory (No default value)
innodb-undo-tablespaces 0
defaults-group mysqld
open-files-limit 0
redo-log-version 1
server-id 67
xtrabackup-plugin-dir (No default value)
generate-new-master-key FALSE
generate-transition-key FALSE
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
version FALSE
target-dir /etc/apt/sources.list.d/xtrabackup_backupfiles/
backup FALSE
stats FALSE
prepare FALSE
export FALSE
apply-log-only FALSE
print-param FALSE
use-memory 104857600
throttle 0
log (No default value)
log-copy-interval 1000
extra-lsndir (No default value)
incremental-lsn (No default value)
incremental-basedir (No default value)
incremental-dir (No default value)
to-archived-lsn 0
tables (No default value)
tables-file (No default value)
databases (No default value)
databases-file (No default value)
tables-exclude (No default value)
databases-exclude (No default value)
create-ib-logfile FALSE
stream (No default value)
compress (No default value)
compress-threads 1
compress-chunk-size 65536
encrypt NONE
encrypt-key-file (No default value)
encrypt-threads 1
encrypt-chunk-size 65536
compact FALSE
rebuild-indexes FALSE
rebuild-threads 1
incremental-force-scan FALSE
close-files FALSE
copy-back FALSE
move-back FALSE
galera-info FALSE
slave-info FALSE
no-lock FALSE
lock-ddl FALSE
lock-ddl-timeout 31536000
lock-ddl-per-table FALSE
backup-lock-timeout 31536000
backup-lock-retry-count 0
dump-innodb-buffer-pool FALSE
dump-innodb-buffer-pool-timeout 10
dump-innodb-buffer-pool-pct 0
safe-slave-backup FALSE
rsync FALSE
force-non-empty-directories FALSE
no-version-check FALSE
tables-compatibility-check TRUE
no-backup-locks FALSE
decompress FALSE
user (No default value)
host (No default value)
port 0
socket (No default value)
incremental-history-name (No default value)
incremental-history-uuid (No default value)
decrypt NONE
remove-original FALSE
ftwrl-wait-query-type ALL
kill-long-query-type SELECT
kill-long-queries-timeout 0
ftwrl-wait-timeout 0
ftwrl-wait-threshold 60
debug-sleep-before-unlock 0
safe-slave-backup-timeout 300
binlog-info auto
reencrypt-for-server-id 0
check-privileges FALSE
read-buffer-size 10485760
ssl TRUE
ssl-verify-server-cert FALSE
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cert (No default value)
ssl-cipher (No default value)
ssl-key (No default value)
ssl-crl (No default value)
ssl-crlpath (No default value)
tls-version TLSv1,TLSv1.1,TLSv1.2
server-public-key-path (No default value)
root@rabbitmq-02:/etc/apt/sources.list.d#
root@rabbitmq-02:/etc/apt/sources.list.d#
-- 安装压缩包:
sudo apt install qpress
网址:
https://docs.percona.com/percona-xtrabackup/2.4/installation/apt_repo.html#installing-percona-xtrabackup-via-percona-release
https://blog.youkuaiyun.com/goldDaNiu/article/details/81505143
1. 添加源:
/etc/apt/sources.list.d/percona-release.list
vim /etc/apt/sources.list.d/percona-release.list
=========================================================================================================================================================
deb http://repo.percona.com/apt VERSION main testing
deb-src http://repo.percona.com/apt VERSION main testing
deb http://repo.percona.com/apt jessie main testing
deb-src http://repo.percona.com/apt jessie main testing
===========================================================================================================================================================
2. 更新源:
apt-get update
root@rabbitmq-02:/etc/apt/sources.list.d# apt-get update
忽略:1 http://repo.percona.com/apt VERSION InRelease
命中:2 http://mirrors.aliyun.com/ubuntu bionic InRelease
获取:3 http://repo.percona.com/apt jessie InRelease [15.9 kB]
命中:4 http://mirrors.aliyun.com/ubuntu bionic-security InRelease
命中:5 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
命中:6 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease
命中:7 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
获取:8 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy InRelease [5,182 B]
错误:9 http://repo.percona.com/apt VERSION Release
404 Not Found [IP: 147.135.54.159 80]
获取:10 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy InRelease [5,182 B]
获取:11 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy InRelease [5,182 B]
错误:3 http://repo.percona.com/apt jessie InRelease
由于没有公钥,无法验证下列签名: NO_PUBKEY 9334A25F8507EFA5
忽略:12 https://packages.erlang-solutions.com/ubuntu focal InRelease
获取:13 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main amd64 Packages [94.0 kB]
命中:14 https://packages.erlang-solutions.com/ubuntu focal Release
忽略:15 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
获取:16 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main amd64 Packages [15.1 kB]
获取:17 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy InRelease [5,182 B]
获取:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages [16.9 kB]
忽略:21 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
忽略:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
获取:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages [15.1 kB]
忽略:15 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
忽略:21 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
忽略:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
忽略:15 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
忽略:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
忽略:21 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
错误:15 https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
404 Not Found [IP: 172.67.140.63 443]
忽略:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
错误:21 https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
404 Not Found [IP: 172.67.140.63 443]
忽略:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
忽略:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
错误:18 https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu jammy/main i386 Packages
404 Not Found [IP: 104.21.27.7 443]
错误:22 https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu jammy/main i386 Packages
404 Not Found [IP: 104.21.27.7 443]
正在读取软件包列表... 完成
E: 仓库 “http://repo.percona.com/apt VERSION Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
W: GPG 错误:http://repo.percona.com/apt jessie InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 9334A25F8507EFA5
E: 仓库 “http://repo.percona.com/apt jessie InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
root@rabbitmq-02:/etc/apt/sources.list.d#
3. 更新依赖源: 用apt --fix-broken install这条命令来修复系统的依赖关系
apt --fix-broken install
root@rabbitmq-02:/etc/apt/sources.list.d# apt --fix-broken install
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在修复依赖关系... 完成
下列软件包是自动安装的并且现在不需要了:
cracklib-runtime dc evince-common gedit-common gir1.2-gtksource-4 gir1.2-totem-1.0 gir1.2-totemplparser-1.0 gnome-themes-extra gnome-themes-extra-data gnome-todo-common
grilo-plugins-0.3-base gtk2-engines-pixbuf guile-2.2-libs libabw-0.1-1 libamtk-5-0 libamtk-5-common libboost-date-time1.71.0 libboost-filesystem1.71.0 libboost-iostreams1.71.0
libboost-locale1.71.0 libclucene-contribs1v5 libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libcrack2 libdjvulibre-text libdjvulibre21 libe-book-0.1-1 libeot0 libepubgen-0.1-1
libetonyek-0.1-1 libexttextcat-2.0-0 libffi6 libfreehand-0.1-1 libgc1c2 libgnome-todo libgoa-backend-1.0-1 libgom-1.0-0 libgpgmepp6 libgspell-1-2 libgspell-1-common
libgtop-2.0-11 libgtop2-common libjuh-java libjurt-java liblua5.3-0 libmediaart-2.0-0 libmhash2 libmspub-0.1-1 libmwaw-0.3-3 libmythes-1.2-0 libneon27-gnutls libodfgen-0.1-1
liborcus-0.15-0 libpagemaker-0.0-0 libpwquality-common libpwquality1 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libqqwing2v5 libraptor2-0 librasqal3 librdf0
libreadline7 librevenge-0.0-0 libridl-java libsctp1 libspectre1 libsuitesparseconfig5 libsynctex2 libsysmetrics1 libtotem0 libunoloader-java libvisio-0.1-1 libwpd-0.10-10
libwpg-0.3-3 libwps-0.4-4 libwxbase3.0-0v5 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-xv0 libyajl2 lp-solve mscompress printer-driver-foo2zjs-common python
python-minimal python2.7 python2.7-minimal shotwell-common totem-common
使用'apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
libcurl4-openssl-dev
建议安装:
libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev libssl-dev zlib1g-dev
下列【新】软件包将被安装:
libcurl4-openssl-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 11 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
需要下载 303 kB 的归档。
解压缩后会消耗 1,433 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libcurl4-openssl-dev amd64 7.58.0-2ubuntu3.24 [303 kB]
已下载 303 kB,耗时 1秒 (368 kB/s)
正在选中未选择的软件包 libcurl4-openssl-dev:amd64。
(正在读取数据库 ... 系统当前共安装有 184440 个文件和目录。)
准备解压 .../libcurl4-openssl-dev_7.58.0-2ubuntu3.24_amd64.deb ...
进度:[ 0%] [.................................................................................................................................................................]
正在解压 libcurl4-openssl-dev:amd64 (7.58.0-2ubuntu3.24) ......................................................................................................................]
正在设置 libcurl4-openssl-dev:amd64 (7.58.0-2ubuntu3.24) ......................................................................................................................]
进度:[ 43%] [#####################################################################............................................................................................]
正在设置 percona-xtrabackup-24 (2.4.29-1.focal) ...######################################################......................................................................]
进度:[ 71%] [###################################################################################################################..............................................]
正在处理用于 man-db (2.9.1-1) 的触发器 ...##############################################################################################################.......................]
root@rabbitmq-02:/etc/apt/sources.list.d#
root@rabbitmq-02:/etc/apt/sources.list.d#
root@rabbitmq-02:/etc/apt/sources.list.d# apt-get install percona-xtrabackup-24
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
percona-xtrabackup-24 已经是最新版 (2.4.29-1.focal)。
下列软件包是自动安装的并且现在不需要了:
cracklib-runtime dc evince-common gedit-common gir1.2-gtksource-4 gir1.2-totem-1.0 gir1.2-totemplparser-1.0 gnome-themes-extra gnome-themes-extra-data gnome-todo-common
grilo-plugins-0.3-base gtk2-engines-pixbuf guile-2.2-libs libabw-0.1-1 libamtk-5-0 libamtk-5-common libboost-date-time1.71.0 libboost-filesystem1.71.0 libboost-iostreams1.71.0
libboost-locale1.71.0 libclucene-contribs1v5 libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libcrack2 libdjvulibre-text libdjvulibre21 libe-book-0.1-1 libeot0 libepubgen-0.1-1
libetonyek-0.1-1 libexttextcat-2.0-0 libffi6 libfreehand-0.1-1 libgc1c2 libgnome-todo libgoa-backend-1.0-1 libgom-1.0-0 libgpgmepp6 libgspell-1-2 libgspell-1-common
libgtop-2.0-11 libgtop2-common libjuh-java libjurt-java liblua5.3-0 libmediaart-2.0-0 libmhash2 libmspub-0.1-1 libmwaw-0.3-3 libmythes-1.2-0 libneon27-gnutls libodfgen-0.1-1
liborcus-0.15-0 libpagemaker-0.0-0 libpwquality-common libpwquality1 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libqqwing2v5 libraptor2-0 librasqal3 librdf0
libreadline7 librevenge-0.0-0 libridl-java libsctp1 libspectre1 libsuitesparseconfig5 libsynctex2 libsysmetrics1 libtotem0 libunoloader-java libvisio-0.1-1 libwpd-0.10-10
libwpg-0.3-3 libwps-0.4-4 libwxbase3.0-0v5 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-xv0 libyajl2 lp-solve mscompress printer-driver-foo2zjs-common python
python-minimal python2.7 python2.7-minimal shotwell-common totem-common
使用'apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 11 个软件包未被升级。
root@rabbitmq-02:/etc/apt/sources.list.d#
4. 查看是否安装:
dpkg -l | grep percona-xtrabackup
5. 安装2.4软件包:
sudo apt-get install percona-xtrabackup-24
dpkg -i percona-xtrabackup-24_2.4.29-1.focal_amd64.deb
root@rabbitmq-02:/home# dpkg -i percona-xtrabackup-24_2.4.29-1.focal_amd64.deb
正在选中未选择的软件包 percona-xtrabackup-24。
(正在读取数据库 ... 系统当前共安装有 184453 个文件和目录。)
准备解压 percona-xtrabackup-24_2.4.29-1.focal_amd64.deb ...
正在解压 percona-xtrabackup-24 (2.4.29-1.focal) ...
正在设置 percona-xtrabackup-24 (2.4.29-1.focal) ...
正在处理用于 man-db (2.9.1-1) 的触发器 ...
root@rabbitmq-02:/home#
查看安装版本:
xtrabackup --v
root@rabbitmq-02:/etc/apt/sources.list.d# xtrabackup --v
xtrabackup: recognized server arguments: --datadir=/home/mysql/data --tmpdir=/tmp --server-id=67 --log_bin=master-bin
xtrabackup: recognized client arguments:
xtrabackup version 2.4.29 based on MySQL server 5.7.44 Linux (x86_64) (revision id: 2e6c0951)
Open source backup tool for InnoDB and XtraDB
Copyright (C) 2009-2017 Percona LLC and/or its affiliates.
Portions Copyright (C) 2000, 2011, MySQL AB & Innobase Oy. All Rights Reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation version 2
of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You can download full text of the license on http://www.gnu.org/licenses/gpl-2.0.txt
Usage: [xtrabackup [--defaults-file=#] --backup | xtrabackup [--defaults-file=#] --prepare] [OPTIONS]
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
The following groups are read: xtrabackup mysqld
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file,
except for login file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=#
Also read groups with concat(group, suffix)
--login-path=# Read this path from the login file.
-v, --version print xtrabackup version information
--target-dir=name destination directory
--backup take backup to target-dir
--stats calc statistic of datadir (offline mysqld is recommended)
--prepare prepare a backup for starting mysql server on the backup.
--export create files to import to another database when prepare.
--apply-log-only stop recovery process not to progress LSN after applying
log when prepare.
--print-param print parameter of mysqld needed for copyback.
--use-memory=# The value is used instead of buffer_pool_size
--throttle=# limit count of IO operations (pairs of read&write) per
second to IOS values (for '--backup')
--log[=name] Ignored option for MySQL option compatibility
--log-copy-interval=#
time interval between checks done by log copying thread
in milliseconds (default is 1 second).
--extra-lsndir=name (for --backup): save an extra copy of the
xtrabackup_checkpoints file in this directory.
--incremental-lsn=name
(for --backup): copy only .ibd pages newer than specified
LSN 'high:low'. ##ATTENTION##: If a wrong LSN value is
specified, it is impossible to diagnose this, causing the
backup to be unusable. Be careful!
--incremental-basedir=name
(for --backup): copy only .ibd pages newer than backup at
specified directory.
--incremental-dir=name
(for --prepare): apply .delta files and logfile in the
specified directory.
--to-archived-lsn=# Don't apply archived logs with bigger log sequence
number.
--tables=name filtering by regexp for table names.
--tables-file=name filtering by list of the exact database.table name in the
file.
--databases=name filtering by list of databases.
--databases-file=name
filtering by list of databases in the file.
--tables-exclude=name
filtering by regexp for table names. Operates the same
way as --tables, but matched names are excluded from
backup. Note that this option has a higher priority than
--tables.
--databases-exclude=name
Excluding databases based on name, Operates the same way
as --databases, but matched names are excluded from
backup. Note that this option has a higher priority than
--databases.
--create-ib-logfile ** not work for now** creates ib_logfile* also after
'--prepare'. ### If you want create ib_logfile*, only
re-execute this command in same options. ###
--stream=name Stream all backup files to the standard output in the
specified format. Currently supported formats are 'tar'
and 'xbstream'.
--compress[=name] Compress individual backup files using the specified
compression algorithm. Currently the only supported
algorithm is 'quicklz'. It is also the default algorithm,
i.e. the one used when --compress is used without an
argument.
--compress-threads=#
Number of threads for parallel data compression. The
default value is 1.
--compress-chunk-size=#
Size of working buffer(s) for compression threads in
bytes. The default value is 64K.
--encrypt=name Encrypt individual backup files using the specified
encryption algorithm.
--encrypt-key=name Encryption key to use.
--encrypt-key-file=name
File which contains encryption key to use.
--encrypt-threads=# Number of threads for parallel data encryption. The
default value is 1.
--encrypt-chunk-size=#
Size of working buffer(S) for encryption threads in
bytes. The default value is 64K.
--compact Create a compact backup by skipping secondary index
pages.
--rebuild-indexes Rebuild secondary indexes in InnoDB tables after applying
the log. Only has effect with --prepare.
--rebuild-threads=# Use this number of threads to rebuild indexes in a
compact backup. Only has effect with --prepare and
--rebuild-indexes.
--incremental-force-scan
Perform a full-scan incremental backup even in the
presence of changed page bitmap data
--close-files do not keep files opened. Use at your own risk.
--core-file Write core on fatal signals
--copy-back Copy all the files in a previously made backup from the
backup directory to their original locations.
--move-back Move all the files in a previously made backup from the
backup directory to the actual datadir location. Use with
caution, as it removes backup files.
--galera-info This options creates the xtrabackup_galera_info file
which contains the local node state at the time of the
backup. Option should be used when performing the backup
of Percona-XtraDB-Cluster. Has no effect when backup
locks are used to create the backup.
--slave-info This option is useful when backing up a replication slave
server. It prints the binary log position and name of the
master server. It also writes this information to the
"xtrabackup_slave_info" file as a "CHANGE MASTER"
command. A new slave for this master can be set up by
starting a slave server on this backup and issuing a
"CHANGE MASTER" command with the binary log position
saved in the "xtrabackup_slave_info" file.
--no-lock Use this option to disable table lock with "FLUSH TABLES
WITH READ LOCK". Use it only if ALL your tables are
InnoDB and you DO NOT CARE about the binary log position
of the backup. This option shouldn't be used if there are
any DDL statements being executed or if any updates are
happening on non-InnoDB tables (this includes the system
MyISAM tables in the mysql database), otherwise it could
lead to an inconsistent backup. If you are considering to
use --no-lock because your backups are failing to acquire
the lock, this could be because of incoming replication
events preventing the lock from succeeding. Please try
using --safe-slave-backup to momentarily stop the
replication slave thread, this may help the backup to
succeed and you then don't need to resort to using this
option.
--lock-ddl Issue LOCK TABLES FOR BACKUP if it is supported by server
at the beginning of the backup to block all DDL
operations.
--lock-ddl-timeout=#
If LOCK TABLES FOR BACKUP does not return within given
timeout, abort the backup.
--lock-ddl-per-table
Lock DDL for each table before xtrabackup starts the copy
phase and until the backup is completed.
--backup-lock-timeout=#
Timeout in seconds for attempts to acquire metadata
locks.
--backup-lock-retry-count=#
Number of attempts to acquire metadata locks.
--dump-innodb-buffer-pool
Instruct MySQL server to dump innodb buffer pool by
issuing a SET GLOBAL innodb_buffer_pool_dump_now=ON
--dump-innodb-buffer-pool-timeout=#
This option specifies the number of seconds xtrabackup
waits for innodb buffer pool dump to complete
--dump-innodb-buffer-pool-pct=#
This option specifies the percentage of buffer pool to be
dumped
--safe-slave-backup Stop slave SQL thread and wait to start backup until
Slave_open_temp_tables in "SHOW STATUS" is zero. If there
are no open temporary tables, the backup will take place,
otherwise the SQL thread will be started and stopped
until there are no open temporary tables. The backup will
fail if Slave_open_temp_tables does not become zero after
--safe-slave-backup-timeout seconds. The slave SQL thread
will be restarted when the backup finishes.
--rsync Uses the rsync utility to optimize local file transfers.
When this option is specified, innobackupex uses rsync to
copy all non-InnoDB files instead of spawning a separate
cp for each file, which can be much faster for servers
with a large number of databases or tables. This option
cannot be used together with --stream.
--force-non-empty-directories
This option, when specified, makes --copy-back or
--move-back transfer files to non-empty directories. Note
that no existing files will be overwritten. If
--copy-back or --nove-back has to copy a file from the
backup directory which already exists in the destination
directory, it will still fail with an error.
--no-version-check This option disables the version check which is enabled
by the --version-check option.
--tables-compatibility-check
This option enables engine compatibility warning.
(Defaults to on; use --skip-tables-compatibility-check to disable.)
--no-backup-locks This option controls if backup locks should be used
instead of FLUSH TABLES WITH READ LOCK on the backup
stage. The option has no effect when backup locks are not
supported by the server. This option is enabled by
default, disable with --no-backup-locks.
--decompress Decompresses all files with the .qp extension in a backup
previously made with the --compress option.
-u, --user=name This option specifies the MySQL username used when
connecting to the server, if that's not the current user.
The option accepts a string argument. See mysql --help
for details.
-H, --host=name This option specifies the host to use when connecting to
the database server with TCP/IP. The option accepts a
string argument. See mysql --help for details.
-P, --port=# This option specifies the port to use when connecting to
the database server with TCP/IP. The option accepts a
string argument. See mysql --help for details.
-p, --password[=name]
This option specifies the password to use when connecting
to the database. It accepts a string argument. See mysql
--help for details.
-S, --socket=name This option specifies the socket to use when connecting
to the local database server with a UNIX domain socket.
The option accepts a string argument. See mysql --help
for details.
--incremental-history-name=name
This option specifies the name of the backup series
stored in the PERCONA_SCHEMA.xtrabackup_history history
record to base an incremental backup on. Xtrabackup will
search the history table looking for the most recent
(highest innodb_to_lsn), successful backup in the series
and take the to_lsn value to use as the starting lsn for
the incremental backup. This will be mutually exclusive
with --incremental-history-uuid, --incremental-basedir
and --incremental-lsn. If no valid lsn can be found (no
series by that name, no successful backups by that name)
xtrabackup will return with an error. It is used with the
--incremental option.
--incremental-history-uuid=name
This option specifies the UUID of the specific history
record stored in the PERCONA_SCHEMA.xtrabackup_history to
base an incremental backup on.
--incremental-history-name, --incremental-basedir and
--incremental-lsn. If no valid lsn can be found (no
success record with that uuid) xtrabackup will return
with an error. It is used with the --incremental option.
--decrypt=name Decrypts all files with the .xbcrypt extension in a
backup previously made with --encrypt option.
--remove-original Remove .qp and .xbcrypt files after decryption and
decompression.
--ftwrl-wait-query-type=name
This option specifies which types of queries are allowed
to complete before innobackupex will issue the global
lock. Default is all.
--kill-long-query-type=name
This option specifies which types of queries should be
killed to unblock the global lock. Default is "SELECT".
--history[=name] This option enables the tracking of backup history in the
PERCONA_SCHEMA.xtrabackup_history table. An optional
history series name may be specified that will be placed
with the history record for the current backup being
taken.
--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.
--ftwrl-wait-timeout=#
This option specifies time in seconds that innobackupex
should wait for queries that would block FTWRL before
running it. If there are still such queries when the
timeout expires, innobackupex terminates with an error.
Default is 0, in which case innobackupex does not wait
for queries to complete and starts FTWRL immediately.
--ftwrl-wait-threshold=#
This option specifies the query run time threshold which
is used by innobackupex to detect long-running queries
with a non-zero value of --ftwrl-wait-timeout. FTWRL is
not started until such long-running queries exist. This
option has no effect if --ftwrl-wait-timeout is 0.
Default value is 60 seconds.
--debug-sleep-before-unlock=#
This is a debug-only option used by the XtraBackup test
suite.
--safe-slave-backup-timeout=#
How many seconds --safe-slave-backup should wait for
Slave_open_temp_tables to become zero. (default 300)
--binlog-info[=name]
This option controls how XtraBackup should retrieve
server's binary log coordinates corresponding to the
backup. Possible values are OFF, ON, LOCKLESS and AUTO.
See the XtraBackup manual for more information
--reencrypt-for-server-id=#
Re-encrypt tablespace keys for given server-id.
--check-privileges Check database user privileges before performing any
query.
--read-buffer-size[=#]
Set datafile read buffer size, given value is scaled up
to page size. Default is 10Mb.
--ssl-mode=name SSL connection mode.
--ssl Deprecated. Use --ssl-mode instead.
(Defaults to on; use --skip-ssl to disable.)
--ssl-verify-server-cert
Deprecated. Use --ssl-mode=VERIFY_IDENTITY instead.
--ssl-ca=name CA file in PEM format.
--ssl-capath=name CA directory.
--ssl-cert=name X509 cert in PEM format.
--ssl-cipher=name SSL cipher to use.
--ssl-key=name X509 key in PEM format.
--ssl-crl=name Certificate revocation list.
--ssl-crlpath=name Certificate revocation list path.
--tls-version=name TLS version to use, permitted values are: TLSv1, TLSv1.1,
TLSv1.2
--server-public-key-path=name
File path to the server public RSA key in PEM format.
-h, --datadir=name Path to the database root.
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
separated by a colon (:), in this case they are used in a
round-robin fashion.
--parallel=# Number of threads to use for parallel datafiles transfer.
The default value is 1.
--log[=name] Ignored option for MySQL option compatibility
--log-bin[=name] Base name for the log sequence
--innodb[=name] Ignored option for MySQL option compatibility
--innodb-adaptive-hash-index
Enable InnoDB adaptive hash index (enabled by default).
Disable with --skip-innodb-adaptive-hash-index.
(Defaults to on; use --skip-innodb-adaptive-hash-index to disable.)
--innodb-autoextend-increment=#
Data file autoextend increment in megabytes
--innodb-buffer-pool-size=#
The size of the memory buffer InnoDB uses to cache data
and indexes of its tables.
--innodb-checksums Enable InnoDB checksums validation (enabled by default).
Disable with --skip-innodb-checksums.
(Defaults to on; use --skip-innodb-checksums to disable.)
--innodb-data-file-path=name
Path to individual files and their sizes.
--innodb-data-home-dir=name
The common part for InnoDB table spaces.
--innodb-doublewrite
Enable InnoDB doublewrite buffer (enabled by default).
Disable with --skip-innodb-doublewrite.
(Defaults to on; use --skip-innodb-doublewrite to disable.)
--innodb-io-capacity[=#]
Number of IOPs the server can do. Tunes the background IO
rate
--innodb-file-io-threads=#
Number of file I/O threads in InnoDB.
--innodb-read-io-threads=#
Number of background read I/O threads in InnoDB.
--innodb-write-io-threads=#
Number of background write I/O threads in InnoDB.
--innodb-file-per-table
Stores each InnoDB table to an .ibd file in the database
dir.
--innodb-flush-log-at-trx-commit[=#]
Set to 0 (write and flush once per second), 1 (write and
flush at each commit) or 2 (write at commit, flush once
per second).
--innodb-flush-method=name
With which method to flush data.
--innodb-force-recovery=#
Helps to save your data in case the disk image of the
database becomes corrupt.
--innodb-log-arch-dir=name
Where full logs should be archived.
--innodb-log-buffer-size=#
The size of the buffer which InnoDB uses to write log to
the log files on disk.
--innodb-log-file-size=#
Size of each log file in a log group.
--innodb-log-files-in-group=#
Number of log files in the log group. InnoDB writes to
the files in a circular fashion. Value 3 is recommended
here.
--innodb-log-group-home-dir=name
Path to InnoDB log files.
--innodb-max-dirty-pages-pct=#
Percentage of dirty pages allowed in bufferpool.
--innodb-open-files=#
How many files at the maximum InnoDB keeps open at the
same time.
--innodb-use-native-aio
Use native AIO if supported on this platform.
--innodb-page-size=#
The universal page size of the database.
--innodb-log-block-size=#
The log block size of the transaction log file. Changing
for created log file is not supported. Use on your own
risk!
--innodb-fast-checksum
Change the algorithm of checksum for the whole of
datapage to 4-bytes word based.
--innodb-doublewrite-file=name
Path to special datafile for doublewrite buffer. (default
is : not used)
--innodb-buffer-pool-filename=name
Filename to/from which to dump/load the InnoDB buffer
pool
--debug-sync=name Debug sync point. This is only used by the xtrabackup
test suite
-#, --debug[=name] Output debug log. Default all ib_log output to stderr. To
redirect all ib_log output to separate file, use
--debug=d,ib_log:o,/tmp/xtrabackup.trace
--innodb-checksum-algorithm=name
The algorithm InnoDB uses for page checksumming. [CRC32,
STRICT_CRC32, INNODB, STRICT_INNODB, NONE, STRICT_NONE]
--innodb-log-checksum-algorithm=name
The algorithm InnoDB uses for log checksumming. [CRC32,
STRICT_CRC32, INNODB, STRICT_INNODB, NONE, STRICT_NONE]
--innodb-undo-directory=name
Directory where undo tablespace files live, this path can
be absolute.
--innodb-undo-tablespaces=#
Number of undo tablespaces to use.
--defaults-group=name
defaults group in config file (default "mysqld").
--open-files-limit=#
the maximum number of file descriptors to reserve with
setrlimit().
--redo-log-version=#
Redo log version of the backup. For --prepare only.
--server-id=# The server instance being backed up
--transition-key[=name]
Transition key to encrypt tablespace keys with.
--xtrabackup-plugin-dir=name
Directory for xtrabackup plugins.
--generate-new-master-key
Generate new master key when doing copy-back.
--generate-transition-key
Generate transition key and store it into keyring.
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
datadir /home/mysql/data
tmpdir /tmp
parallel 1
log (No default value)
log-bin master-bin
innodb (No default value)
innodb-adaptive-hash-index TRUE
innodb-autoextend-increment 8
innodb-buffer-pool-size 8388608
innodb-checksums TRUE
innodb-data-file-path (No default value)
innodb-data-home-dir (No default value)
innodb-doublewrite TRUE
innodb-io-capacity 200
innodb-file-io-threads 4
innodb-read-io-threads 4
innodb-write-io-threads 4
innodb-file-per-table FALSE
innodb-flush-log-at-trx-commit 1
innodb-flush-method (No default value)
innodb-force-recovery 0
innodb-log-arch-dir (No default value)
innodb-log-buffer-size 16777216
innodb-log-file-size 50331648
innodb-log-files-in-group 2
innodb-log-group-home-dir (No default value)
innodb-max-dirty-pages-pct 75
innodb-open-files 300
innodb-use-native-aio FALSE
innodb-page-size 16384
innodb-log-block-size 512
innodb-fast-checksum FALSE
innodb-doublewrite-file (No default value)
innodb-buffer-pool-filename (No default value)
debug-sync (No default value)
debug (No default value)
innodb-checksum-algorithm innodb
innodb-log-checksum-algorithm innodb
innodb-undo-directory (No default value)
innodb-undo-tablespaces 0
defaults-group mysqld
open-files-limit 0
redo-log-version 1
server-id 67
xtrabackup-plugin-dir (No default value)
generate-new-master-key FALSE
generate-transition-key FALSE
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
version FALSE
target-dir /etc/apt/sources.list.d/xtrabackup_backupfiles/
backup FALSE
stats FALSE
prepare FALSE
export FALSE
apply-log-only FALSE
print-param FALSE
use-memory 104857600
throttle 0
log (No default value)
log-copy-interval 1000
extra-lsndir (No default value)
incremental-lsn (No default value)
incremental-basedir (No default value)
incremental-dir (No default value)
to-archived-lsn 0
tables (No default value)
tables-file (No default value)
databases (No default value)
databases-file (No default value)
tables-exclude (No default value)
databases-exclude (No default value)
create-ib-logfile FALSE
stream (No default value)
compress (No default value)
compress-threads 1
compress-chunk-size 65536
encrypt NONE
encrypt-key-file (No default value)
encrypt-threads 1
encrypt-chunk-size 65536
compact FALSE
rebuild-indexes FALSE
rebuild-threads 1
incremental-force-scan FALSE
close-files FALSE
copy-back FALSE
move-back FALSE
galera-info FALSE
slave-info FALSE
no-lock FALSE
lock-ddl FALSE
lock-ddl-timeout 31536000
lock-ddl-per-table FALSE
backup-lock-timeout 31536000
backup-lock-retry-count 0
dump-innodb-buffer-pool FALSE
dump-innodb-buffer-pool-timeout 10
dump-innodb-buffer-pool-pct 0
safe-slave-backup FALSE
rsync FALSE
force-non-empty-directories FALSE
no-version-check FALSE
tables-compatibility-check TRUE
no-backup-locks FALSE
decompress FALSE
user (No default value)
host (No default value)
port 0
socket (No default value)
incremental-history-name (No default value)
incremental-history-uuid (No default value)
decrypt NONE
remove-original FALSE
ftwrl-wait-query-type ALL
kill-long-query-type SELECT
kill-long-queries-timeout 0
ftwrl-wait-timeout 0
ftwrl-wait-threshold 60
debug-sleep-before-unlock 0
safe-slave-backup-timeout 300
binlog-info auto
reencrypt-for-server-id 0
check-privileges FALSE
read-buffer-size 10485760
ssl TRUE
ssl-verify-server-cert FALSE
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cert (No default value)
ssl-cipher (No default value)
ssl-key (No default value)
ssl-crl (No default value)
ssl-crlpath (No default value)
tls-version TLSv1,TLSv1.1,TLSv1.2
server-public-key-path (No default value)
root@rabbitmq-02:/etc/apt/sources.list.d#
root@rabbitmq-02:/etc/apt/sources.list.d#
-- 安装压缩包:
sudo apt install qpress
官网网址:
https://docs.percona.com/percona-xtrabackup/2.4/installation/apt_repo.html#installing-percona-xtrabackup-via-percona-release