xtrabackup 排错

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,高可用系列 2核4GB
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

相关实践学习
每个IT人都想学的“Web应用上云经典架构”实战
本实验从Web应用上云这个最基本的、最普遍的需求出发,帮助IT从业者们通过“阿里云Web应用上云解决方案”,了解一个企业级Web应用上云的常见架构,了解如何构建一个高可用、可扩展的企业级应用架构。
MySQL数据库入门学习
本课程通过最流行的开源数据库MySQL带你了解数据库的世界。   相关的阿里云产品:云数据库RDS MySQL 版 阿里云关系型数据库RDS(Relational Database Service)是一种稳定可靠、可弹性伸缩的在线数据库服务,提供容灾、备份、恢复、迁移等方面的全套解决方案,彻底解决数据库运维的烦恼。 了解产品详情: https://www.aliyun.com/product/rds/mysql 
相关文章
|
SQL 存储 数据可视化
Ganos矢量快显功能上手系列2:增强的MVT能力
本文主要介绍Ganos新增的2D矢量动态切片函数及其使用方法。新增的矢量动态切片函数能够大幅提升可视化效率,有效解决小比例尺MVT显示耗时久的问题。和PostGIS相比,小比例尺MVT的可视化效率提升可达60%以上。
|
11月前
|
NoSQL MongoDB 数据库
|
SQL 存储 关系型数据库
MySQL备份:mydumper 备份恢复工具生产实战
MySQL备份:mydumper 备份恢复工具生产实战
|
关系型数据库 数据库 PostgreSQL
postgresql|【基于pg_basebackup命令的归档备份和恢复---热备冷恢复方式】
postgresql|【基于pg_basebackup命令的归档备份和恢复---热备冷恢复方式】
661 0
|
NoSQL 测试技术 MongoDB
MongoDB数据库管理:全面掌握mongodump和mongorestore的备份与恢复技巧
MongoDB数据库管理:全面掌握mongodump和mongorestore的备份与恢复技巧
442 0
|
运维 监控 NoSQL
RedisShake的基本原理
RedisShake的基本原理
621 0
|
存储 缓存 Cloud Native
阿里云 ClickHouse 企业版云原生 ClickHouse 技术揭秘
云数据库 ClickHouse 企业版是阿里云和 ClickHouse, Inc 战略合作打造的云原生ClickHouse 产品。企业版推出专属 SharedMergeTree 云原生引擎,支持存算分离,Serverless 秒级实时弹性,集群吞吐和查询效率线性扩展及 Lightweight update 实时更新能力。本文将详细揭秘 SharedMergeTree 实现机制,实时弹性扩展实现原理,lightweight update 技术实现原理,同时对企业版和开源版进行详细的性能测试对比。
2132 1
阿里云 ClickHouse 企业版云原生 ClickHouse 技术揭秘
|
NoSQL Java Redis
Redisson集群管理工具、对Redis节点的操作
Redisson集群管理工具、对Redis节点的操作
484 1
pg_basebackup原理解析
pg_basebackup原理解析
274 0
|
NoSQL Linux Redis
Linux 安装 Redis(CentOS 安装 Redis)
Linux 安装 Redis(CentOS 安装 Redis)