新环境上测试percona-xtrabackup-2.2.5-Linux-x86_64新版本,出现以下几个问题.
下载地址:
1. 没安装perl-DBD-MySQL
$innobackupex --defaults-file=/db/mysql5.6/my.cnf -user=bkpuser -password=s3cret -socket=/db/mysql5.6/mysql.sock /home/mysql
innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/db/mysql5.6/my.cnf;mysql_read_default_group=xtrabackup' as 'bkpuser' (using password: YES).
innobackupex: Error: Failed to connect to MySQL server as DBD::mysql module is not installed at /usr/bin/innobackupex line 2960.
根据操作系统的版本安装合适的perl-DBD-MySQL后问题解决
# rpm -ivh perl-DBD-MySQL-4.013-3.el6.x86_64.rpm
2.没指定--defaults-file参数
innobackupex -user=bkpuser -password=s3cret -socket=/db/mysql5.6/mysql.sock /home/mysqlweb
错误如下:
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
141022 17:33:37 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;mysql_socket=/db/mysql5.6/mysql.sock' as 'bkpuser' (using password: YES).
141022 17:33:37 innobackupex: Connected to MySQL server
141022 17:33:37 innobackupex: Executing a version check against the server...
141022 17:33:37 innobackupex: Done.
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql server version 5.6.17-log
innobackupex: Created backup directory /home/mysqlweb/2014-10-22_17-33-37
141022 17:33:37 innobackupex: Starting ibbackup with command: xtrabackup --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/home/mysqlweb/2014-10-22_17-33-37 --tmpdir=/tmp --extra-lsndir='/tmp'
innobackupex: Waiting for ibbackup (pid=20882) to suspend
innobackupex: Suspend file '/home/mysqlweb/2014-10-22_17-33-37/xtrabackup_suspended_2'
xtrabackup version 2.2.5 based on MySQL server 5.6.21 Linux (x86_64) (revision id: )
xtrabackup: uses posix_fadvise().
xtrabackup: cd to
xtrabackup: open files limit requested 0, set to 10240
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 50331648
2014-10-22 17:33:37 7f4783e7b720 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: File ./ib_logfile0: 'open' returned OS error 71. Cannot continue operation
innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2681.
3.指定的备份路径不存在
$innobackupex -user=bkpuser -password=s3cret -socket=/db/mysql5.6/mysql.sock /home/mysql
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
141022 17:35:03 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;mysql_socket=/db/mysql5.6/mysql.sock' as 'bkpuser' (using password: YES).
141022 17:35:03 innobackupex: Connected to MySQL server
141022 17:35:03 innobackupex: Executing a version check against the server...
141022 17:35:03 innobackupex: Done.
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql server version 5.6.17-log
innobackupex: Error: Failed to create backup directory /home/mysql/2014-10-22_17-35-03: No such file or directory at /usr/bin/innobackupex line 3949.
备忘,以记之。