mysql之 percona-xtrabackup 2.4.7安裝(熱備工具)
準備:os是centos6.7,提前下載並上傳 percona-xtrabackup 安裝包,下載網址為:
1.安裝依賴包
[root@localhost xtrabackup]# yum -y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl-DBD-MySQL
Dependency Installed:
perl-DBI.x86_64 0:1.609-4.el6
Complete!
2. 安裝 percona-xtrabackup 工具
2.1 -- 發現缺包
[root@mysql01 ~]# rpm -ivh percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm
warning: percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
libcurl.so.3()(64bit) is needed by percona-xtrabackup-24-2.4.7-1.el5.x86_64
libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.7-1.el5.x86_64
2.2 -- 配置本地yum源後,用 yum 發現依然找不到包,搜尋後,網友解決方法是 單獨下載 libev-4.15-1.el6.rf.x86_64.rpm 包
2.3 -- 安裝 libev-4.15-1.el6.rf.x86_64.rpm 包,過了。
[root@mysql01 ~]# rpm -ivh libev-4.15-1.el6.rf.x86_64.rpm
[root@mysql01 ~]# rpm -ivh percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm
warning: percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
libcurl.so.3()(64bit) is needed by percona-xtrabackup-24-2.4.7-1.el5.x86_64
2.4 -- libcurl.so.3()(64bit) is needed by percona-xtrabackup-24-2.4.7-1.el5.x86_64 ,依然解決不了,最後決定強行安裝。(這個問題卡了兩個小時,現在不能很好的解決,留到以後再看)
[root@mysql01 ~]# rpm -ivh percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm --nodeps --force
warning: percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
Preparing... ########################################### [100%]
1:percona-xtrabackup-24 ########################################### [100%]
3. 測試,檢視 percona-xtrabackup 版本
[root@mysql01 ~]# innobackupex -v
innobackupex version 2.4.7 Linux (x86_64) (revision id: 6f7a799)
[root@mysql01 ~]# rpm -ql percona-xtrabackup-24
/usr/bin/innobackupex
/usr/bin/xbcloud
/usr/bin/xbcloud_osenv
/usr/bin/xbcrypt
/usr/bin/xbstream
/usr/bin/xtrabackup
說明:Xtrabackup有兩個主要的工具:xtrabackup、innobackupex
a、xtrabackup只能備份InnoDB和XtraDB兩種資料表,而不能備份MyISAM資料表
b、innobackupex是一個perl指令碼封裝了xtrabackup。支援同時備份InnoDB和MyISAM引擎的表。
4. 測試全備資料庫
[root@mysql01 ~]# innobackupex --user=root --password=oracle --port=3606 --socket=/var/lib/mysql/mysql.sock /xtrabackup/full/
170602 06:48:07 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!".
170602 06:48:07 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;port=3606;mysql_socket=/var/lib/mysql/mysql.sock' as 'root' (using password: YES).
Failed to connect to MySQL server as DBD::mysql module is not installed at - line 1327.
170602 06:48:07 Connecting to MySQL server host: localhost, user: root, password: set, port: 3606, socket: /var/lib/mysql/mysql.sock
Using server version 5.6.25
innobackupex version 2.4.7 based on MySQL server 5.7.13 Linux (x86_64) (revision id: 6f7a799)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql/
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
。。。。
170602 06:48:10 Executing UNLOCK TABLES
170602 06:48:10 All tables unlocked
170602 06:48:10 Backup created in directory '/xtrabackup/full/2017-06-02_06-48-07/'
170602 06:48:10 [00] Writing backup-my.cnf
170602 06:48:10 [00] ...done
170602 06:48:10 [00] Writing xtrabackup_info
170602 06:48:10 [00] ...done
xtrabackup: Transaction log of lsn (1626027) to (1626027) was copied.
170602 06:48:10 completed OK!
5. 檢查備份
[root@mysql01 ~]# ll /xtrabackup/full/
total 4
drwxr-x---. 5 root root 4096 Jun 2 06:53 2017-06-02_06-53-37
說明:工具使用沒有問題,成功!
1.安裝依賴包
[root@localhost xtrabackup]# yum -y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl-DBD-MySQL
Dependency Installed:
perl-DBI.x86_64 0:1.609-4.el6
Complete!
2. 安裝 percona-xtrabackup 工具
2.1 -- 發現缺包
[root@mysql01 ~]# rpm -ivh percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm
warning: percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
libcurl.so.3()(64bit) is needed by percona-xtrabackup-24-2.4.7-1.el5.x86_64
libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.7-1.el5.x86_64
2.2 -- 配置本地yum源後,用 yum 發現依然找不到包,搜尋後,網友解決方法是 單獨下載 libev-4.15-1.el6.rf.x86_64.rpm 包
2.3 -- 安裝 libev-4.15-1.el6.rf.x86_64.rpm 包,過了。
[root@mysql01 ~]# rpm -ivh libev-4.15-1.el6.rf.x86_64.rpm
[root@mysql01 ~]# rpm -ivh percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm
warning: percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
libcurl.so.3()(64bit) is needed by percona-xtrabackup-24-2.4.7-1.el5.x86_64
2.4 -- libcurl.so.3()(64bit) is needed by percona-xtrabackup-24-2.4.7-1.el5.x86_64 ,依然解決不了,最後決定強行安裝。(這個問題卡了兩個小時,現在不能很好的解決,留到以後再看)
[root@mysql01 ~]# rpm -ivh percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm --nodeps --force
warning: percona-xtrabackup-24-2.4.7-1.el5.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
Preparing... ########################################### [100%]
1:percona-xtrabackup-24 ########################################### [100%]
3. 測試,檢視 percona-xtrabackup 版本
[root@mysql01 ~]# innobackupex -v
innobackupex version 2.4.7 Linux (x86_64) (revision id: 6f7a799)
[root@mysql01 ~]# rpm -ql percona-xtrabackup-24
/usr/bin/innobackupex
/usr/bin/xbcloud
/usr/bin/xbcloud_osenv
/usr/bin/xbcrypt
/usr/bin/xbstream
/usr/bin/xtrabackup
說明:Xtrabackup有兩個主要的工具:xtrabackup、innobackupex
a、xtrabackup只能備份InnoDB和XtraDB兩種資料表,而不能備份MyISAM資料表
b、innobackupex是一個perl指令碼封裝了xtrabackup。支援同時備份InnoDB和MyISAM引擎的表。
4. 測試全備資料庫
[root@mysql01 ~]# innobackupex --user=root --password=oracle --port=3606 --socket=/var/lib/mysql/mysql.sock /xtrabackup/full/
170602 06:48:07 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!".
170602 06:48:07 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;port=3606;mysql_socket=/var/lib/mysql/mysql.sock' as 'root' (using password: YES).
Failed to connect to MySQL server as DBD::mysql module is not installed at - line 1327.
170602 06:48:07 Connecting to MySQL server host: localhost, user: root, password: set, port: 3606, socket: /var/lib/mysql/mysql.sock
Using server version 5.6.25
innobackupex version 2.4.7 based on MySQL server 5.7.13 Linux (x86_64) (revision id: 6f7a799)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql/
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
。。。。
170602 06:48:10 Executing UNLOCK TABLES
170602 06:48:10 All tables unlocked
170602 06:48:10 Backup created in directory '/xtrabackup/full/2017-06-02_06-48-07/'
170602 06:48:10 [00] Writing backup-my.cnf
170602 06:48:10 [00] ...done
170602 06:48:10 [00] Writing xtrabackup_info
170602 06:48:10 [00] ...done
xtrabackup: Transaction log of lsn (1626027) to (1626027) was copied.
170602 06:48:10 completed OK!
5. 檢查備份
[root@mysql01 ~]# ll /xtrabackup/full/
total 4
drwxr-x---. 5 root root 4096 Jun 2 06:53 2017-06-02_06-53-37
說明:工具使用沒有問題,成功!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31383567/viewspace-2140190/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Mysql管理必備工具maatkit(安裝)MySql
- mysql企業備份工具(MEB)之mysqlbackup安裝及使用MySql
- MySQL系列第三篇:MySQL工具之SQLYog安裝配置MySql
- MySQL 之XtraBackup全量增量熱備實踐MySql
- Ubuntu下編譯安裝OpenCV 2.4.7並讀取攝像頭Ubuntu編譯OpenCV
- Mysql主從熱備MySql
- mysql01_安裝前準備MySql
- 【工具】MySQL 安裝利器---SandboxMySql
- Nagios備忘之安裝iOS
- Openfire安裝準備-MySQL資料庫準備MySql資料庫
- MySQL 5.6.21下載安裝之安裝篇(二)MySql
- MySQL 高可用性之 Keepalived 雙主熱備MySql
- MySQL全面瓦解:安裝部署與準備MySql
- puppet之mysql批量安裝案例MySql
- mysql的冷備份與熱備份MySql
- Spark從入門到放棄——Spark2.4.7安裝和啟動(二)Spark
- Mysql 利用percona-xtrabackup線上配置主從MySql
- mysql備份工具MySql
- MySQL之——RPM方式安裝MySQL5.6MySql
- Mysql 學習篇之原始碼安裝mysqlMySql原始碼
- Flask+Mysql搭建網站之安裝MysqlFlaskMySql網站
- mysql之 xtrabackup-2.4.12 安裝MySql
- Openfiler+RAC的安裝之六--安裝前的準備工作
- 【MySQL資料庫】MySQL5.7安裝與配置、視覺化工具安裝和破解MySql資料庫視覺化
- centos下安裝JAVA開發工具(3)——MysqlCentOSJavaMySql
- Percona-Xtrabackup 2.3.3 慢查詢不再堵塞備份(二)
- 熱門報導:CentOS7安裝[Mysql,JDK,TomCat]CentOSMySqlJDKTomcat
- mysql安裝 (yum 安裝)MySql
- MySQL5.7新特性之備份工具mysqlpump的使用MySql
- mysql之tar.gz原始碼安裝MySql原始碼
- 【MySql】 MySql備份工具Xtrabackup之二MySql
- 【MySql】 MySql備份工具Xtrabackup之一MySql
- MySQL雙機互備熱備自動切換KVMySql
- MySQL的冷備份和熱備份概念理解(轉)MySql
- 工具安裝
- mysql分析慢查詢日誌工具mysqlsla安裝MySql
- dataguard回顧之安裝——建立邏輯備庫
- mysql 安裝MySql