1 time tar -xvf Open..tarx.gz


real    35m22.502s

user    10m16.499s

sys     1m28.578s

You have new mail in /var/spool/mail/root

PS:  Open..tarx.gzv 大小80G

2 time innobackupex --user=xxx --password=xxxx --defaults-file=/etc/my.cnf  --apply-log /home/alldb/
real    1m14.259s

user    0m0.356s

sys     0m2.672s

You have new mail in /var/spool/mail/root

3 copy以及chown

PS:磁盘空间不足,所以不能执行copyback,直接MV了。
mv /home/alldb/* /data/xxxx/open/ 

chown -R mysql.mysql /data/xxxx/open/

4 启动 service mysqld start
用5.5.20的mysql启动报错如下:

121221 10:40:36 mysqld_safe Starting mysqld daemon with databases from /data/md/open

121221 10:40:36 [Note] Flashcache bypass: disabled

121221 10:40:36 [Note] Flashcache setup error is : ioctl failed

121221 10:40:36 InnoDB: The InnoDB memory heap is disabled

121221 10:40:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins

121221 10:40:36 InnoDB: Compressed tables use zlib 1.2.3

121221 10:40:36 InnoDB: Initializing buffer pool, size = 4.9G

121221 10:40:37 InnoDB: Completed initialization of buffer pool

121221 10:40:37 InnoDB: Error: data file /data/md/open/ibdata2 uses page size 1024,

121221 10:40:37 InnoDB: but the only supported page size in this release is=16384

121221 10:40:37 InnoDB: Could not open or create data files.

121221 10:40:37 InnoDB: If you tried to add new data files, and it failed here,

121221 10:40:37 InnoDB: you should now edit innodb_data_file_path in my.cnf back

121221 10:40:37 InnoDB: to what it was, and remove the new ibdata files InnoDB created

121221 10:40:37 InnoDB: in this failed attempt. InnoDB only wrote those files full of

121221 10:40:37 InnoDB: zeros, but did not yet use them in any way. But be careful: do not

121221 10:40:37 InnoDB: remove old data files which contain your precious data!

121221 10:40:37 [ERROR] Plugin 'InnoDB' init function returned error.

121221 10:40:37 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

121221 10:40:37 [ERROR] Unknown/unsupported storage engine: InnoDB

121221 10:40:37 [ERROR] Aborting

121221 10:40:37 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

121221 10:40:37 mysqld_safe mysqld from pid file /data/md/open/test-db-20058.pid ended

5 google很久,看到说mysql升级到5.5的时候也报but the only supported page size in this release is=16384的错误,
于是就找原来版本5.1的安装目录,用mysqld_safe启动,ok,搞定

sudo /usr/local/mysql-5.1.56/bin/mysqld_safe --basedir=/usr/local/mysql-5.1.56/ --datadir=/data/md/open --user=mysql &

6 mysql 登录正常,验证slave:

mysql> grant all on *.* to 'tim'@'%' identified by 'xxxxx';

mysql> change master to master_user='repl', master_password='xxx#@!xxxx', master_host='90.60.201.30', master_log_file='mysql-bin.000449',master_log_pos=831708136;

mysql> start slave;

mysql> show slave status\G;

*************************** 1. row ***************************

               Slave_IO_State: 

                  Master_Host: 90.60.201.30

                  Master_User: repl

                  Master_Port: 3306

                Connect_Retry: 60

              Master_Log_File: mysql-bin.000449

          Read_Master_Log_Pos: 831708239

               Relay_Log_File: mb-bbs-db3-relay-bin.003261

                Relay_Log_Pos: 3914557

        Relay_Master_Log_File: mysql-bin.000449


             Slave_IO_Running: Yes

            Slave_SQL_Running: Yes
              Replicate_Do_DB: 

          Replicate_Ignore_DB: 

           Replicate_Do_Table: 

       Replicate_Ignore_Table: 

      Replicate_Wild_Do_Table: 

  Replicate_Wild_Ignore_Table: 

                   Last_Errno: 0

                   Last_Error: 

                 Skip_Counter: 0

          Exec_Master_Log_Pos: 831708239

              Relay_Log_Space: 3940542

              Until_Condition: None

               Until_Log_File: 

                Until_Log_Pos: 0

           Master_SSL_Allowed: No

           Master_SSL_CA_File: 

           Master_SSL_CA_Path: 

              Master_SSL_Cert: 

            Master_SSL_Cipher: 

               Master_SSL_Key: 


        Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No

                Last_IO_Errno: 0

                Last_IO_Error: 

               Last_SQL_Errno: 0

               Last_SQL_Error: 

1 row in set (0.00 sec)

ERROR: 

No query specified

利用Xtrabackup备份集合恢复一台从库的过程的更多相关文章

  1. 利用xtrabackup备份mysql数据库

    利用xtrabackup备份mysql数据库 一.安装1.直接下载二进制文件wget http://www.percona.com/downloads/XtraBackup/XtraBackup-2. ...

  2. MySql在生产环境中是用mysqldump还是xtrabackup备份和恢复数据

    如题,究竟该使用mysqldump还是xtrabackup,要说用,两个都能备份,都支持热备,但是生产环境我们要考虑的是效率,就是不管备份还是恢复,都要快,要稳定. 之前我在维护mysql数据库的时候 ...

  3. xtrabackup备份和恢复数据脚本

    该脚本用于备份和恢复MySQL数据库. 总结xtrabackup备份的两个坑: 1.在恢复数据的过程中,如果中途出错,则数据将会被破坏,后续很难再恢复. 2.在恢复过程中,如果版本过低,在准备全量数据 ...

  4. [MySQL-MM] 生产环境自动恢复MM中一台M2库的过程,分享从零开始写的自动化重建脚本以及思路 (转)

    必须是MM架构,而且一台主库M1是完好无损的,一台主库M2可以根据M1主库来进行重建:如果MS架构,自己可以稍微做一下脚本修改动作,也能使用,架构如下图所示: 3  总体思路,建立主脚本a_build ...

  5. xtrabackup 备份和恢复

    该文章接上一篇文章: 内核方面: $ cat /etc/centos-release CentOS Linux release 7.4.1708 (Core) $ uname -r 3.10.0-69 ...

  6. Percona Xtrabackup备份及恢复

    1. http://www.percona.com/software/percona-xtrabackup下载并安装 2. 全量备份  a.全量备份到制定目录            innobacku ...

  7. 11g RAC OCR,VOTING DISK存储全部损坏,利用自动备份,恢复OCR,VOTING DISK到新存储。

    背景: 11g R2 rac 的orc ,voting disk asm存储磁盘全部损坏.通过调查得知 损坏的 OCR磁盘对应为 VOL1 ,voting disk磁盘对应于 VOL2 . 故,添加a ...

  8. ORACLE 11g 用Duplicate恢复Data Guard 备库详细过程

    1.先查找备库控制文件路径 先在备库上找出控制文件的路径,通过和主库一样,不过为了以防万一,还是check为好. SQL>  select name from v$controlfile; NA ...

  9. 从xtrabackup备份恢复单表

    目前对MySQL比较流行的备份方式有两种,一种上是使用自带的mysqldump,另一种是xtrabackup,对于数据时大的环境,普遍使用了xtrabackup+binlog进行全量或者增量备份,那么 ...

随机推荐

  1. Windows系统命令行net user命令用法

    在Windows渗透测试过程中,最常用的要数net user 命令了,但是非常多的时候我们都是对Linux命令非常熟悉,对Windows命令非常熟悉或者了解用法的少只有少,为了以后工作方便,这里记录一 ...

  2. WEB开发:如何用js来模拟服务器的ajax响应,不依赖服务器来编写前端代码

    一.问题的提出 目前web前端开发,主流的思路是: 1)编写静态的html文件(不使用模板技术,与服务器无关) 2)页面通过ajax与服务器交互,进行数据的传输,数据格式为json格式 这里存在一个问 ...

  3. Install TightVNC Server in RHEL/CentOS and Fedora to Access Remote Desktops

    Virtual Networking Computing (VNC) is a Kind of remote sharing system that makes it possible to take ...

  4. H面试程序(28):字符串处理转换

    //2 字符串处理转换 //问题描述: //在给定字符串中找出单词( “单词”由大写字母和小写字母字符构成, //其他非字母字符视为单词的间隔,如空格.问号.数字等等:另外单个字母不算单词): //找 ...

  5. 一步一步重写 CodeIgniter 框架 (11) —— 使用 CodeIgniter 函数库

    在完成了CI框架的类库扩展后,很自然我们就会想到函数库的扩展.函数库的扩展在 CI 中称为 helper 函数与类有不同的地方,它不能继承,只能覆盖或者添加新的函数,或者直接完全新定义的一组函数. 由 ...

  6. Shell之sed命令

    sed用于一次性处理所有的编辑任务,尤为高效,为用户节省了大量的时间,sed适用于以下三种场合: 1.编辑相对交互文本编辑器而言太大的文件: 2.编辑命令太复杂,在交互式文本编辑器中难以输入的情况: ...

  7. Vim 使用设置

    转自:http://www.cnblogs.com/end/archive/2012/06/01/2531147.html Vim 作为最好用的文本编辑器之一,使用vim来编文档,写代码实在是很惬意的 ...

  8. arm:c语言和汇编混合编程

    仅作演示. 1.C和汇编可相互调用,汇编子函数格式参考 汇编:普通的函数调用的汇编代码解析 http://www.cnblogs.com/mylinux/p/4139972.html 本文演示了 : ...

  9. SQL Server 基础 01 数据库、表操作

    对着书慢慢学习,一天一点点! 数据库操作 (create.alter.drop)  --3-3-1 /create database 语句创建数据库 create database testSQL - ...

  10. 演练5-2:Contoso大学校园管理2

    一.添加列标题排序功能 我们将增加Student/Index页面的功能,为列标题添加超链接,用户可以点击列标题对那一列进行排序. 1.修改Index方法 public ActionResult Ind ...