RHEL安装Xtrabackup
发表于:2025-02-02 作者:千家信息网编辑
千家信息网最后更新 2025年02月02日,Xtrabackup是由percona提供的mysql数据库备份工具,据官方介绍,这也是世界上唯一一个开源的能够对innodb和xtradb数据库进行物理热备的工具。Xtrabackup中主要有包含两
千家信息网最后更新 2025年02月02日RHEL安装XtrabackupXtrabackup是由percona提供的mysql数据库备份工具,据官方介绍,这也是世界上唯一一个开源的能够对innodb和xtradb数据库进行物理热备的工具。
Xtrabackup中主要有包含两个工具:
1.innobackupex:是将xtrabackup进行封装的perl脚本,提供了备份myisam表的能力,
2.xtrabackup:是用于热备innodb,xtradb表中数据的工具,不能备份其他类型的表,也不能备份数据表结构;
环境:
[root@rhel72 soft]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 7.2 (Maipo)
Release: 7.2
Codename: Maipo
[root@rhel72 soft]# uname -a
Linux rhel72 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@rhel72 soft]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.15.102 rhel72
介质:
Percona-XtraBackup-2.4.10-r3198bce-el6-x86_64-bundle.tar
Server version: 5.6.38-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)
开始安装
[root@rhel72 soft]# rpm -ivh *rpm
warning: percona-xtrabackup-24-2.4.10-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.10-1.el6.x86_64
rsync is needed by percona-xtrabackup-24-2.4.10-1.el6.x86_64
[root@rhel72 soft]# yum whatprovides '*/libev.so.4'
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No matches found
未在镜像中找到该包,网上下载
https://altlinux.pkgs.org/sisyphus/classic-x86_64/libev4-4.24-alt1.x86_64.rpm.html
[root@rhel72 soft]# rpm -ivh libev4-4.24-alt1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:libev4-4.24-alt1 ################################# [100%]
[root@rhel72 soft]# yum whatprovides '*/rsync'
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
rsync-3.0.9-17.el7.x86_64 : A program for synchronizing files over a network
Repo : server
Matched from:
Filename : /usr/bin/rsync
[root@rhel72 soft]# yum -y install rsync-3.0.9-17.el7.x86_64
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package rsync.x86_64 0:3.0.9-17.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
rsync x86_64 3.0.9-17.el7 server 359 k
Transaction Summary
====================================================================================================================================
Install 1 Package
Total download size: 359 k
Installed size: 732 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : rsync-3.0.9-17.el7.x86_64 1/1
Verifying : rsync-3.0.9-17.el7.x86_64 1/1
Installed:
rsync.x86_64 0:3.0.9-17.el7
Complete!
--重新安装软件包
[root@rhel72 soft]# rpm -ivh *rpm
warning: percona-xtrabackup-24-2.4.10-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:percona-xtrabackup-24-2.4.10-1.el################################# [ 33%]
2:percona-xtrabackup-test-24-2.4.10################################# [ 67%]
3:percona-xtrabackup-24-debuginfo-2################################# [100%]
--查看帮助
[root@rhel72 soft]# xtrabackup -help|more
xtrabackup version 2.4.10 based on MySQL server 5.7.19 Linux (x86_64) (revision id: 3198bce)
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]
....
[root@rhel72 gaoyc]# innobackupex --help
Open source backup tool for InnoDB and XtraDB
Copyright (C) 2009-2015 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
innobackupex - Non-blocking backup tool for InnoDB, XtraDB and HailDB databases
NOTICE: 'innobackupex' is deprecated, please switch to 'xtrabackup'
SYNOPOSIS
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
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
.....
Xtrabackup中主要有包含两个工具:
1.innobackupex:是将xtrabackup进行封装的perl脚本,提供了备份myisam表的能力,
2.xtrabackup:是用于热备innodb,xtradb表中数据的工具,不能备份其他类型的表,也不能备份数据表结构;
环境:
[root@rhel72 soft]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 7.2 (Maipo)
Release: 7.2
Codename: Maipo
[root@rhel72 soft]# uname -a
Linux rhel72 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@rhel72 soft]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.15.102 rhel72
介质:
Percona-XtraBackup-2.4.10-r3198bce-el6-x86_64-bundle.tar
Server version: 5.6.38-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)
开始安装
[root@rhel72 soft]# rpm -ivh *rpm
warning: percona-xtrabackup-24-2.4.10-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.10-1.el6.x86_64
rsync is needed by percona-xtrabackup-24-2.4.10-1.el6.x86_64
[root@rhel72 soft]# yum whatprovides '*/libev.so.4'
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No matches found
未在镜像中找到该包,网上下载
https://altlinux.pkgs.org/sisyphus/classic-x86_64/libev4-4.24-alt1.x86_64.rpm.html
[root@rhel72 soft]# rpm -ivh libev4-4.24-alt1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:libev4-4.24-alt1 ################################# [100%]
[root@rhel72 soft]# yum whatprovides '*/rsync'
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
rsync-3.0.9-17.el7.x86_64 : A program for synchronizing files over a network
Repo : server
Matched from:
Filename : /usr/bin/rsync
[root@rhel72 soft]# yum -y install rsync-3.0.9-17.el7.x86_64
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package rsync.x86_64 0:3.0.9-17.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
rsync x86_64 3.0.9-17.el7 server 359 k
Transaction Summary
====================================================================================================================================
Install 1 Package
Total download size: 359 k
Installed size: 732 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : rsync-3.0.9-17.el7.x86_64 1/1
Verifying : rsync-3.0.9-17.el7.x86_64 1/1
Installed:
rsync.x86_64 0:3.0.9-17.el7
Complete!
--重新安装软件包
[root@rhel72 soft]# rpm -ivh *rpm
warning: percona-xtrabackup-24-2.4.10-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:percona-xtrabackup-24-2.4.10-1.el################################# [ 33%]
2:percona-xtrabackup-test-24-2.4.10################################# [ 67%]
3:percona-xtrabackup-24-debuginfo-2################################# [100%]
--查看帮助
[root@rhel72 soft]# xtrabackup -help|more
xtrabackup version 2.4.10 based on MySQL server 5.7.19 Linux (x86_64) (revision id: 3198bce)
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]
....
[root@rhel72 gaoyc]# innobackupex --help
Open source backup tool for InnoDB and XtraDB
Copyright (C) 2009-2015 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
innobackupex - Non-blocking backup tool for InnoDB, XtraDB and HailDB databases
NOTICE: 'innobackupex' is deprecated, please switch to 'xtrabackup'
SYNOPOSIS
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
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
.....
备份
工具
数据
数据库
世界
两个
介质
备份工具
官方
数据表
是由
物理
环境
类型
结构
能力
脚本
软件
软件包
镜像
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
应用软件开发靠谱公司
ssh 连接多个数据库
《中华人民共和国网络安全》
中院网络安全培训
阿里云服务器管理员怎么升级
国家有哪些网络安全法律法规
数据库poco的时候不分离
眼镜行业软件开发条件
服务器可以装多少应用
北京海淀区的服务器公司虚拟主机
软件开发 市场分析
软件开发按月怎么计算费用
崇明区直销软件开发
数据库安全设计总结报告
网络安全风清气正
淄博染色软件开发咨询
公共频道家庭教育和网络安全
网络安全视频教程
美国人缺乏网络安全吗
怎么保证服务器安全
万得数据库在哪查绿色金融数据
沈阳市医药软件开发公司
lol马来西亚服务器
网络技术社会作用
我国网络安全法规法律现状
数据库语句指定查询某个字段
沈阳做系统软件开发的
通用游戏服务器框架
公司网络安全通告
怎么让电脑作为家庭服务器