percona xtrabackup 之一 setup
os: centos 7.4
db: mysql 5.7
dbbackup: xtrabackup 2.4.9
xtrabackup是一款優秀的mysql開源備份(物理備份)工具,是由percona公司開發的。
下載
官網下載
https://www.percona.com/software/mysql-database/percona-xtrabackup
https://www.percona.com/downloads/XtraBackup/LATEST/
也有git的支持
https://github.com/percona/percona-xtrabackup
文檔
https://www.percona.com/doc/percona-xtrabackup/LATEST/index.html
https://www.percona.com/doc/percona-xtrabackup/2.4/index.html
Percona-XtraBackup-2.4.9.pdf
安裝
主要有幾種方式
1)yum Repositories方式
yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
yum list|grep -i percona
yum install percona-xtrabackup-24.x86_64
2)手動rpm包安裝
Percona-XtraBackup-2.4.9-ra467167cdd4-el7-x86_64-bundle.tar
3)二進制的方式
percona-xtrabackup-2.4.9-Linux-x86_64.tar.gz
4)源碼編譯
percona-xtrabackup-2.4.9.tar.gz
5)git方式,越來越多的項目提供git支持了
https://github.com/percona/percona-xtrabackup.git
https://github.com/percona/percona-xtrabackup
本次采用手動rpm方式
# yum install cmake openssl-devel libaio libaio-devel automake autoconf \ bison libtool ncurses-devel libgcrypt-devel libev-devel libcurl-devel zlib-devel \ vim-common libev # cd /tmp/xtrabackup # tar -xvf ./Percona-XtraBackup-2.4.9-ra467167cdd4-el7-x86_64-bundle.tar # rpm -ivh ./percona-xtrabackup-24-2.4.9-1.el7.x86_64.rpm至此,xtrabackup就算安裝好了,下面來簡述如何備份和還原,更靈活的用法計劃再寫幾篇xtrabackup專題blog
# which innobackupex /usr/bin/innobackupex # which xtrabackup /usr/bin/xtrabackup # ls -l /usr/bin/innobackupex lrwxrwxrwx 1 root root 10 Mar 26 21:06 /usr/bin/innobackupex -> xtrabackup可以看到 innobackupex 是到 xtrabackup 的軟鏈
# innobackupex --help # xtrabackup --help這兩個的輸出還是不太一樣innobackupex --help 有這樣一句描述
NOTICE: ‘innobackupex’ is deprecated, please switch to ‘xtrabackup’
所以還是安心使用 xtrabackup
Percona XtraBackup is a set of following tools: innobackupex innobackupex is the symlink for xtrabackup. innobackupex still supports all features and syntax as 2.2 version did, but is now deprecated and will be removed in next major release.xtrabackup a compiled C binary that provides functionality to backup a whole MySQL database instance with MyISAM, InnoDB, and XtraDB tables.xbcrypt utility used for encrypting and decrypting backup files.xbstream utility that allows streaming and extracting files to/from the xbstream format.xbcloud utility used for downloading and uploading full or part of xbstream archive from/to cloud.After Percona XtraBackup 2.3 release the recommend way to take the backup is using the xtrabackup script. More information on script options can be found in how to use xtrabackup.總結
以上是生活随笔為你收集整理的percona xtrabackup 之一 setup的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php仿淘宝课程设计任务书
- 下一篇: 集五福华为机试python_支付宝集五福