xtrabackup 排错

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介:

由于线上环境数据库特别大,只能采取 xtrabackup备份还原


特点:
(1)
备份过程快速、可靠;
(2)
备份过程不会打断正在执行的事务;
(3)
能够基于压缩等功能节约磁盘空间和流量;
(4)
自动实现备份检验;
(5)
还原速度快;


innobackupex --defaults-file=/etc/my.cnf --user=root -password='root' --database=root -socket=/var//mysql/mysql.sock /root/bakmysql


一直显示报错信息

 innobackupex: Waiting for ibbackup (pid=1004) to suspend
innobackupex: Suspend file '/root/bakmysql/2015-12-01_17-06-01/xtrabackup_suspended_2'

libgcc_s.so.1 must be installed for pthread_cancel to work
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 2703
main::wait_for_ibbackup_file_create('/root/bakmysql/2015-12-01_17-06-01/xtrabackup_suspended_2') called at /usr/bin/innobackupex line 2723
main::wait_for_ibbackup_suspend('/root/bakmysql/2015-12-01_17-06-01/xtrabackup_suspended_2') called at /usr/bin/innobackupex line 1976
main::backup() called at /usr/bin/innobackupex line 1601
innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2703. 


原来发现库没安装

解决方法:yum install libgcc.i686  


第二个报错还原时候出现

151201 18:51:26  innobackupex: Starting the apply-log operation


IMPORTANT: Please check that the apply-log run completes successfully.

           At the end of a successful apply-log run innobackupex

           prints "completed OK!".


innobackupex:: Warning: Ignored unrecognized line 2 in options : 'xtrabackup: Error: Please set parameter 'datadir'

'

innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 4511

main::get_option('innodb_data_file_path') called at /usr/bin/innobackupex line 2623

main::apply_log() called at /usr/bin/innobackupex line 1570

innobackupex: Error: no 'mysqld' group in server configuration file '/etc/my.cnf' at /usr/bin/innobackupex line 4511.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[root@ bakmysql] # rpm -ivh percona-xtrabackup-2.2.12-1.el6.x86_64.rpm
warning: percona-xtrabackup-2.2.12-1.el6.x86_64.rpm: Header V4 DSA /SHA1  Signature, key ID cd2efd2a: NOKEY
Preparing...                 ########################################### [100%]
     file  /usr/bin/innobackupex  from  install  of percona-xtrabackup-2.2.12-1.el6.x86_64 conflicts with  file  from package percona-xtrabackup-2.2.10-1.el6.x86_64
     file  /usr/bin/xbcrypt  from  install  of percona-xtrabackup-2.2.12-1.el6.x86_64 conflicts with  file  from package percona-xtrabackup-2.2.10-1.el6.x86_64
     file  /usr/bin/xbstream  from  install  of percona-xtrabackup-2.2.12-1.el6.x86_64 conflicts with  file  from package percona-xtrabackup-2.2.10-1.el6.x86_64
     file  /usr/bin/xtrabackup  from  install  of percona-xtrabackup-2.2.12-1.el6.x86_64 conflicts with  file  from package percona-xtrabackup-2.2.10-1.el6.x86_64
     file  /usr/share/man/man1/innobackupex .1.gz from  install  of percona-xtrabackup-2.2.12-1.el6.x86_64 conflicts with  file  from package percona-xtrabackup-2.2.10-1.el6.x86_64
     file  /usr/share/man/man1/xbcrypt .1.gz from  install  of percona-xtrabackup-2.2.12-1.el6.x86_64 conflicts with  file  from package percona-xtrabackup-2.2.10-1.el6.x86_64
     file  /usr/share/man/man1/xbstream .1.gz from  install  of percona-xtrabackup-2.2.12-1.el6.x86_64 conflicts with  file  from package percona-xtrabackup-2.2.10-1.el6.x86_64
     file  /usr/share/man/man1/xtrabackup .1.gz from  install  of percona-xtrabackup-2.2.12-1.el6.x86_64 conflicts with  file  from package percona-xtrabackup-2.2.10-1.el6.x86_64
[root@ bakmysql] # yum remove percona-xtrabackup-2.2.10-1.el6.x86_64
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package percona-xtrabackup.x86_64 0:2.2.10-1.el6 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
======================================================================================================================
  Package                           Arch                  Version                       Repository                Size
======================================================================================================================
Removing:
  percona-xtrabackup                x86_64                2.2.10-1.el6                  installed                 21 M
 
Transaction Summary
======================================================================================================================
Remove        1 Package(s)
 
Installed size: 21 M
Is this ok [y /N ]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
   Erasing    : percona-xtrabackup-2.2.10-1.el6.x86_64                                                             1 /1 
   Verifying  : percona-xtrabackup-2.2.10-1.el6.x86_64                                                             1 /1 
 
Removed:
   percona-xtrabackup.x86_64 0:2.2.10-1.el6                                                                            
 
Complete!
[root@ bakmysql] # rpm -ivh percona-xtrabackup-2.2.12-1.el6.x86_64.rpm
warning: percona-xtrabackup-2.2.12-1.el6.x86_64.rpm: Header V4 DSA /SHA1  Signature, key ID cd2efd2a: NOKEY
Preparing...                 ########################################### [100%]
    1:percona-xtrabackup      ########################################### [100%]
[root@ bakmysql] #

[root@ mysqlbak]# innobackupex --user=root --password='root' --defaults-file=/etc/my.cnf --apply-log  /root/ROOT/2015-12-01_19-23-53


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


151201 20:02:34  innobackupex: Starting the apply-log operation


IMPORTANT: Please check that the apply-log run completes successfully.

           At the end of a successful apply-log run innobackupex

           prints "completed OK!".


innobackupex:: Warning: Ignored unrecognized line 2 in options : 'xtrabackup: Error: Please set parameter 'datadir'

'

innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 4511

main::get_option('innodb_data_file_path') called at /usr/bin/innobackupex line 2623

main::apply_log() called at /usr/bin/innobackupex line 1570

innobackupex: Error: no 'mysqld' group in server configuration file '/etc/my.cnf' at /usr/bin/innobackupex line 4511.



[root@ data]# mv mysql mysql1

[root@ data]# mkdir mysql

[root@ data]# innobackupex --user=root --password='root' --defaults-file=/etc/my.cnf --copy-back  /root/ROOT/2015-12-01_19-23-53


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


151201 20:16:38  innobackupex: Starting the copy-back operation


IMPORTANT: Please check that the copy-back run completes successfully.

           At the end of a successful copy-back run innobackupex

           prints "completed OK!".


innobackupex: Starting to copy files in '/root/ROOT/2015-12-01_19-23-53'

innobackupex: back to original data directory '/data/mysql'

innobackupex: Copying '/root/ROOT/2015-12-01_19-23-53/xtrabackup_info' to '/data/mysql/xtrabackup_info'

'/data/mysql/wash/ws_user.frm'

innobackupex: Copying '/root/ROOT/2015-12-01_19-23-53/wash/ws_order_file.frm' to '/data/mysql/wash/ws_order_file.frm'

innobackupex: Copying '/root/ROOT/2015-12-01_19-23-53/wash/ws_beautician_time.frm' to '/data/mysql/wash/ws_beautician_time.frm'

innobackupex: Copying '/root/ROOT/2015-12-01_19-23-53/wash/db.opt' to '/data/mysql/wash/db.opt'


'/data/mysql/mysql/procs_priv.MYD'

innobackupex: Copying '/root/ROOT/2015-12-01_19-23-53/mysql/user.frm' to '/data/mysql/mysql/user.frm'

'/data/mysql/ib_logfile1'

innobackupex: Finished copying back files.


151201 20:16:38  innobackupex: completed OK!

完成



本文转自 cs312779641 51CTO博客,原文链接:http://blog.51cto.com/chenhao6/1718587

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
6天前
|
关系型数据库 MySQL 数据库
什么是xtrabackup工具?
【5月更文挑战第13天】什么是xtrabackup工具?
8 0
|
12月前
|
Oracle 关系型数据库
Dataguard排错三例
排除日志不传输的错误 查看目前归档
|
关系型数据库 MySQL 数据库
【MySQL】Xtrabackup备份工具使用
Xtrabackup是由percona提供的mysql数据库备份工具,支持在线热备份(备份时不影响数据读写). Xtrabackup有两个主要的工具:xtrabackup、innobackupex 1、xtrabackup只能备份InnoDB和XtraDB两种数据表,而不能备份MyISAM数据表 2、innobackupex是参考了InnoDB Hotbackup的innoback脚本修改而来的.innobackupex是一个perl脚本封装,封装了xtrabackup。主要是为了方便的 同时备份InnoDB和MyISAM引擎的表,但在处理myisam时需要加一个读锁。并且加入了一些使用的选项
273 0
|
关系型数据库 MySQL
【MySQL】Xtrabackup备份及恢复脚本
此备份脚本的策略是每周日和周三进去全备 其余每天增量备份。
536 0
|
关系型数据库 MySQL 测试技术
Percona XtraBackup 关于 MySQL备份还原的详细测试
Percona XtraBackup 关于 MySQL备份还原的详细测试一. Percona XtraBackup 的优点。(1)无需停止数据库进行InnoDB热备; (2)增量备份MySQL; (3)流压缩传输到其它服务器; (4)在线移动表; (5)能够比较容易地创建主从同步; (6)备份MySQL时不会增大服务器负载。
1412 0
|
存储 Oracle 关系型数据库
|
MySQL 关系型数据库 数据库
|
存储 关系型数据库 MySQL