percona-xtrabackup安装(一)

Linux系统环境:

Red Hat Enterprise Linux Server release 6.5 (Santiago)

MySQL版本:5.7.9 Source distribution

1. Install the Percona repository

[[email protected] yum.repos.d]# wget 
[[email protected] yum.repos.d]# rpm -ivh percona-release-0.1-3.noarch.rpm 
warning: percona-release-0.1-3.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
Preparing...              ########################################### [100%]
   1:percona-release        ########################################### [100%]

2. Testing the repository

[[email protected] yum.repos.d]# yum list | grep percona-xtrabackup
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
percona-xtrabackup.x86_64          2.3.8-1.el6            percona-release-x86_64
percona-xtrabackup-20.x86_64       2.0.8-587.rhel6        percona-release-x86_64
percona-xtrabackup-20-debuginfo.x86_64
percona-xtrabackup-20-test.x86_64  2.0.8-587.rhel6        percona-release-x86_64
percona-xtrabackup-21.x86_64       2.1.9-746.rhel6        percona-release-x86_64
percona-xtrabackup-21-debuginfo.x86_64
percona-xtrabackup-22.x86_64       2.2.13-1.el6           percona-release-x86_64
percona-xtrabackup-22-debuginfo.x86_64
percona-xtrabackup-24.x86_64       2.4.7-2.el6            percona-release-x86_64
percona-xtrabackup-24-debuginfo.x86_64
percona-xtrabackup-debuginfo.x86_64
percona-xtrabackup-test.x86_64     2.3.8-1.el6            percona-release-x86_64
percona-xtrabackup-test-21.x86_64  2.1.9-746.rhel6        percona-release-x86_64
percona-xtrabackup-test-22.x86_64  2.2.13-1.el6           percona-release-x86_64
percona-xtrabackup-test-24.x86_64  2.4.7-2.el6            percona-release-x86_64

3. Install the packages

[[email protected] yum.repos.d]# yum install percona-xtrabackup-24
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package percona-xtrabackup-24.x86_64 0:2.4.7-2.el6 will be installed
--> Processing Dependency: libev.so.4()(64bit) for package: percona-xtrabackup-24-2.4.7-2.el6.x86_64
--> Finished Dependency Resolution
Error: Package: percona-xtrabackup-24-2.4.7-2.el6.x86_64 (percona-release-x86_64)
           Requires: libev.so.4()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

yum install percona-xtrabackup-21

yum install percona-xtrabackup-22

执行以上两条命令安装是没有错误提示的

percona-xtrabackup-24依赖libev.so.4(),安装对应的包即可解决

4. Install the libev-4.15-1.el6.rf.x86_64.rpm

[[email protected] yum.repos.d]# wget 
[[email protected] yum.repos.d]# rpm -ivh libev-4.15-1.el6.rf.x86_64.rpm
warning: libev-4.15-1.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing...                ########################################### [100%]
   1:libev                  ########################################### [100%] 
[[email protected] yum.repos.d]# yum install percona-xtrabackup-24
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package percona-xtrabackup-24.x86_64 0:2.4.7-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================
 Package                     Arch         Version             Repository                    Size
=================================================================================================
Installing:
 percona-xtrabackup-24       x86_64       2.4.7-2.el6         percona-release-x86_64       7.9 M

Transaction Summary
=================================================================================================
Install       1 Package(s)

Total download size: 7.9 M
Installed size: 31 M
Is this ok [y/N]: y
Downloading Packages:
percona-xtrabackup-24-2.4.7-2.el6.x86_64.rpm                              | 7.9 MB     04:41     
warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
Importing GPG key 0xCD2EFD2A:
 Userid : Percona MySQL Development Team <[email protected]>
 Package: percona-release-0.1-3.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : percona-xtrabackup-24-2.4.7-2.el6.x86_64                                      1/1 
  Verifying  : percona-xtrabackup-24-2.4.7-2.el6.x86_64                                      1/1 

Installed:
  percona-xtrabackup-24.x86_64 0:2.4.7-2.el6                                                     

Complete!

5. Uninstalling Percona XtraBackup

[[email protected] yum.repos.d]# yum remove percona-xtrabackup-24

6. backup database

全备的最小权限

mysql> CREATE USER ‘bkpuser‘@‘localhost‘ IDENTIFIED BY ‘s3cret‘;
Query OK, 0 rows affected (0.49 sec)
mysql> GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT,PROCESS ON *.* TO ‘bkpuser‘@‘localhost‘;
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.35 sec)

[[email protected] backup]# innobackupex --user=bkpuser --password=s3cret --socket=/tmp/mysql.sock /oracle/app/backup
170620 16:15:27 innobackupex: Starting the backup operation

IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".

170620 16:15:27  version_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql_read_default_group=xtrabackup;mysql_socket=/tmp/mysql.sock‘ as ‘bkpuser‘  (using password: YES).
170620 16:15:28  version_check Connected to MySQL server
170620 16:15:28  version_check Executing a version check against the server...
170620 16:15:28  version_check Done.
170620 16:15:28 Connecting to MySQL server host: localhost, user: bkpuser, password: set, port: not set, socket: /tmp/mysql.sock
Using server version 5.7.9
innobackupex version 2.4.7 based on MySQL server 5.7.13 Linux (x86_64) (revision id: 05f1fcf)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /oracle/app/mysql-5.7/data/
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
InnoDB: Number of pools: 1
170620 16:15:28 >> log scanned up to (2476814)
省略。。。
170620 16:15:36 [00]        ...done
170620 16:15:36 Backup created in directory ‘/oracle/app/backup/2017-06-20_16-15-27/‘
170620 16:15:36 [00] Writing backup-my.cnf
170620 16:15:36 [00]        ...done
170620 16:15:36 [00] Writing xtrabackup_info
170620 16:15:36 [00]        ...done
xtrabackup: Transaction log of lsn (2476805) to (2476814) was copied.
170620 16:15:36 completed OK!

backup_type说明为全备。
时间: 2024-09-30 18:32:31

percona-xtrabackup安装(一)的相关文章

CentOS 6.4下Percona Xtrabackup安装部署错误处理

在centos 6.4 安装部署Percona Xtrabackup,执行全备份脚本,备份不成功,查看日志,报错如下: 11:15:51  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup;mysql_socket=/data/lib/mysql/mysql.sock' as 'd

Percona Xtrabackup 安装

1.安装Percona Xtrabackup YUM Repository --安装repository [[email protected] ~]# yum install https://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm --查看repository信息 [[email protected] ~]# yum list | grep percona 2.

Percona XtraBackup 安装介绍篇

XtraBackup介绍 XtraBackup是Percona公司的开源项目,用以实现类似Innodb官方的热备份工具InnoDB Hot Backup的功能,它支持在线热备份(备份时不影响数据读写).到目前为止,最新的版本为Percona XtraBackup 2.4.7. XtraBackup有很多功能和优点:例如支持全备.增量备份.部分备份:支持压缩备份:备份不影响数据读写.事务等,但是也有缺陷不足:例如不支持脱机备份.不支持直接备份到磁带设备.不支持Cloud Back,MyISAM的备

Percona xtrabackup 安装与使用

Backup一直是数据库最重要的环节,mysql也比例外.而mysql最好的备份工具就是Percona xtrabackup和Mysql Enterprise backup(官方收费版). Xtrabackup中主要包含两个工具: xtrabackup:是用于热备份innodb, xtradb表中数据的工具,不能备份其他类型的表(Myisam表),也不能备份数据表结构. innobackupex:是将xtrabackup进行封装的perl脚本,可以备份和恢复MyISAM表以及数据表结构. 但是针

percona xtrabackup 安装及使用

一.安装 下载https://www.percona.com/downloads/XtraBackup/ 先下载了percona-xtrabackup-24-2.4.4-1.el5.x86_64.rpm,安装报libcurl.so.3 与 libev.so.4找不到,libev.so.3 可以通yum install libev解决,但是libcurl.so.3通过做软链接(cd /usr/lib64   ln -s libcurl.so.4 libcurl.so.3 )或者从别的系统复制一份 

Percona XtraBackup 备份还原篇

Percona XtraBackup 安装介绍篇已经对Percona XtraBackup的功能和安装做了比较详细的介绍,那么本篇我们直接进入主题,如何使用XtraBackup做备份.还原,下面主要介绍XtraBackup备份还原操作的细节和场景,疏漏之处难免存在,如有不足,敬请指出.本篇暂时不做原理介绍,后续篇章"Percona XtraBackup 原理分析篇"再做介绍.   XtraBackup完整备份   备份的权限 使用XtraBack做备份,需要连接到数据库服务器并在服务器

yum 安装percona xtrabackup

centos5.6下配置percona的yum仓库并安装xtrabackup工具 一.先安装依赖: yum install perl-DBI yum install perl-DBD-MySQL yum install perl-Time-HiRes yum install perl-IO-Socket-SSL 二.配置yum源. 方法1.自动安装percona的yum仓库(以下分别为x86_64和i386平台) #rpm -ivh http://www.percona.com/download

Percona Xtrabackup备份mysql (完整备份与增量备份)

Xtrabackup简介 Percona XtraBackup是开源免费的MySQL数据库热备份软件,它能对InnoDB和XtraDB存储引擎的数据库非阻塞地备份(对于MyISAM 的备份同样需要加表锁).XtraBackup支持所有的Percona Server.MySQL.MariaDB和Drizzle. XtraBackup优势 : 1.无需停止数据库进行InnoDB热备 2.增量备份MySQL 3.流压缩到传输到其它服务器 4.能比较容易地创建主从同步 5.备份MySQL时不会增大服务器

Percona Xtrabackup备份mysql全库及指定数据库(完整备份与增量备份)

原文地址:http://www.tuicool.com/articles/RZRnq2 Xtrabackup简介 Percona XtraBackup是开源免费的MySQL数据库热备份软件,它能对InnoDB和XtraDB存储引擎的数据库非阻塞地备份(对于MyISAM的备份 同样需要加表锁).XtraBackup支持所有的Percona Server.MySQL.MariaDB和Drizzle. XtraBackup优势 : 1.无需停止数据库进行InnoDB热备 2.增量备份MySQL 3.流

Percona Xtrabackup备份mysql(转)

原文:http://www.drupal001.com/2014/02/percona-xtrabackup-mysql/ Xtrabackup简介 Percona XtraBackup是开源免费的MySQL数据库热备份软件,它能对InnoDB和XtraDB存储引擎的数据库非阻塞地备份(对于MyISAM的备份同样需要加表锁).XtraBackup支持所有的Percona Server.MySQL.MariaDB和Drizzle. XtraBackup优势 : 1.无需停止数据库进行InnoDB热