Not the answer you need?
Register and ask your own question!

Error doing first backup

rdwwdrrdwwdr EntrantInactive User Role Beginner
I'm attempting to use XtraBackup for the first time and it is failing and I can't figure out why.

# uname -a
Linux 2.6.32-358.18.1.el6.x86_64 #1 SMP Wed Aug 28 17:19:38 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

show variables like "%version%"









MySQL Community Server (GPL)





MySql and the XtraBackup are running on the same box.

From the MySql data directory (/var/lib/mysql) I run the following,

and get the following result,
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.

130917 22:26:09 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup' as 'root' (using password: YES).
130917 22:26:09 innobackupex: Connected to MySQL server
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.13-log

innobackupex: Created backup directory /var/lib/mysql/dbbackup/2013-09-17_22-26-09

130917 22:26:09 innobackupex: Starting ibbackup with command: xtrabackup_56 --defaults-file="/etc/my.cnf" --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/var/lib/mysql/dbbackup/2013-09-17_22-26-09 --tmpdir=/tmp
innobackupex: Waiting for ibbackup (pid=14699) to suspend
innobackupex: Suspend file '/var/lib/mysql/dbbackup/2013-09-17_22-26-09/xtrabackup_suspended_2'

xtrabackup_56 version 2.1.4 for MySQL server 5.6.11 Linux (x86_64) (revision id: 656)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to
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
2013-09-17 22:26:09 7f1fd2104720 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
2013-09-17 22:26:09 7f1fd2104720 InnoDB: File name ./ib_logfile0
2013-09-17 22:26:09 7f1fd2104720 InnoDB: File operation call: 'open' returned OS error 71.
2013-09-17 22:26:09 7f1fd2104720 InnoDB: Cannot continue operation.
innobackupex: Error: ibbackup child process has died at /usr/bin/innobackupex line 416.

I can't decipher these errors.

ib_logfile0 exists and is the size reported in the output,
# ls -lat ib_logfile0
-rw-rw---- 1 mysql mysql 50331648 Sep 17 00:19 ib_logfile0

What path is it looking for when it complains "InnoDB: The error means the system cannot find the path specified."?

perror says 17 is a protocol error?
# perror 71
OS error code 71: Protocol error

Any help would be greatly appreciated.



  • niljoshiniljoshi MySQL Sage Inactive User Role Beginner
    Hi Ron,

    As you have given
    [email protected]:~$ perror 2
    OS error code 2: No such file or directory
    [email protected]:~$

    That means, it can't able to find data dir for taking backup of ibdata and ib_logfiles. Can you check my.cnf that all paths are properly defined? Please share your my.cnf and Xtrbackup version which you are using for further investigation. Thanks.
  • rdwwdrrdwwdr Entrant Inactive User Role Beginner
    Thanks. The /etc/my.cnf is very simple and doesn't include the datadir. I guess there is another version around that contains datadir (I didn't install mysql and i'm a linux novice so I don't where). Anyway, I added datadir=/var/lib/mysql to /etc/my.cnf and it worked. More descriptive error messages would be helpful.
  • webmatwebmat Entrant Inactive User Role Beginner
    Hitting the same problem here. Seems like a bug in innobackupex.

    MySQL works just fine without the paths specified, and simply defaults to the data dir for both.

    Innobackupex seems to need them specified explicitly, though. Not a deal breaker, it turns out, as you can simply add both explicitly to you config file you'll be fine:

    innodb_data_home_dir = /var/lib/mysql
    innodb_log_group_home_dir = /var/lib/mysql
    # ...

    Note also that the purpose of - at least as I understand it - is to pass supplemental information to innobackupex. You don't need to point it to your /etc/my.cnf explicitly. So if you can't modify /etc/my.cnf easily right now, you can always work around the error by passing innobackupex a short supplemental file that only contains this, and it will work:

    You only need to invoke it like this:
  • webmatwebmat Entrant Inactive User Role Beginner
    Correction: --defaults-file= is meant to specify a complete config file, not additional parameters.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.