Created
March 28, 2016 22:56
-
-
Save codezixo/95f1ce8a86fd750256f9 to your computer and use it in GitHub Desktop.
Percona innobackupex Xtrabackup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # backup | |
| innobackupex --stream=xbstream --parallel=4 --compress --compress-threads=2 /var/lib/mysql > /root/backup/backup.xbstream | |
| # restore | |
| xbstream -x < /root/backup/backup.xbstream | |
| yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm | |
| yum install qpress | |
| for i in $(find -name "*.qp"); do qpress -vd $i $(dirname ${i}) && rm -f $i; done | |
| innobackupex --apply-log ./ | |
| service mysql stop | |
| rm -Rf /var/lib/mysql/* | |
| innobackupex --copy-back ./ | |
| chown -Rf mysql.mysql /var/lib/mysql | |
| service mysql start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment