innobackupex恢复操作解压备份文件报错一例

来源:互联网 发布:c语言base64编码 编辑:程序博客网 时间:2024/06/07 16:47

     该问题我也遇到过一次,后面又有网友也在问这个报错,现在重新测试后整理到blog中,供大家参考。


一.问题描述
 在用xtrabackup工具恢复操作,由于备份时有带压缩参数,需要先解压:
innobackupex --decompress /apps/backup/xtrabackup_20160517010001
报如下错:
[apps@mvxl0784 xtrabackup_20160517010001]$ innobackupex --decompress /apps/backup/xtrabackup_20160517010001
innobackupex: got a fatal error with the following stacktrace: at /usr/local/percona-xtrabackup-2.2.9-Linux-x86_64/bin/innobackupex line 3999
        main::check_args() called at /usr/local/percona-xtrabackup-2.2.9-Linux-x86_64/bin/innobackupex line 1531
innobackupex: Error: --decompress requires qpress

二.问题分析


 我们先查看线上库的备份脚本:innobackupex --defaults-file=${this_conf_f} --user=${db_user} --password=${db_pass} --socket=${socket} --slave-info --lock-wait-timeout=120 --compress --no-timestamp ${this_back_p} 1>${base_p}/${logfilename} 2>&1
有带compress参数压缩备份,根据报错提示,需要qpress组件支持,才能解压。


三.问题处理

所以从网上下载qpress安装:
访问:http://www.quicklz.com/,下载qpress-11-linux-x64.tar包,并解压后,copy到/usr/bin下。
[root@mvxl0784 etc]# cd /apps/tool
[root@mvxl0784 tool]# tar -xvf qpress-11-linux-x64.tar
[root@mvxl0784 tool]# cp qpress /usr/bin/

再执行解压操作就正常了,如下:
[apps@mvxl0784 ~]$ innobackupex --decompress /apps/backup/xtrabackup_20160517010001

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013.  All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

Get the latest version of Percona XtraBackup, documentation, and help resources:
http://www.percona.com/xb/p

160518 09:57:14  innobackupex: Starting the decryption and decompression operation

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

160518 09:59:05  innobackupex: completed OK!

0 0
原创粉丝点击