今天在做数据库备份数据遇到一个问题,主要原因是:备份和恢复的时候使用的xtrabackup的版本不一致
问题
使用xtrabackup校验数据的时候报错:
# innobackupex --apply-log /data/back/
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
141125 09:43:44 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'backupuser' (using password: YES).
Failed to connect to MySQL server to detect version.
You must set xtrabackup version to use with --ibbackup option.
Possible values are xtrabackup_55 (for MySQL 5.5), xtrabackup_56 (for MySQL or Percona Server 5.6, or xtrabackup (for MySQL 5.1 with InnoDB plugin or Percona Server)
根据报错提示,失败查明mysql的版本,需要指明--ibbacku