# Error doing first backup

**URL:** <https://forums.percona.com/t/error-doing-first-backup/2945>\
**Category:** Percona XtraBackup\
**Created:** [September 17, 2013, 5:18pm UTC](https://forums.percona.com/t/error-doing-first-backup/2945 "2013-09-17T17:18:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdwwdr](https://avatars.discourse-cdn.com/v4/letter/r/7feea3/32.png) [@rdwwdr](https://forums.percona.com/u/rdwwdr)\
**Post date:** [September 17, 2013, 5:18pm UTC](https://forums.percona.com/t/error-doing-first-backup/2945/1 "2013-09-17T17:18:57Z")

</div>

I’m attempting to use XtraBackup for the first time and it is failing and I can’t figure out why.

SETUP [INDENT]# uname -a  
Linux [server10076.i3d.net](http://server10076.i3d.net) 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%”[/INDENT]  
[TABLE]  
[TR]  
[TD] [INDENT]innodb\_version[/INDENT]  
[/TD]  
[TD] [INDENT]5.6.13[/INDENT]  
[/TD]  
[/TR]  
[TR]  
[TD] [INDENT]protocol\_version[/INDENT]  
[/TD]  
[TD] [INDENT]10[/INDENT]  
[/TD]  
[/TR]  
[TR]  
[TD] [INDENT]slave\_type\_conversions[/INDENT]  
[/TD]  
[TD] [INDENT] [/INDENT]  
[/TD]  
[/TR]  
[TR]  
[TD] [INDENT]version[/INDENT]  
[/TD]  
[TD] [INDENT]5.6.13[/INDENT]  
[/TD]  
[/TR]  
[TR]  
[TD] [INDENT]version\_comment[/INDENT]  
[/TD]  
[TD] [INDENT]MySQL Community Server (GPL)[/INDENT]  
[/TD]  
[/TR]  
[TR]  
[TD] [INDENT]version\_compile\_machine[/INDENT]  
[/TD]  
[TD] [INDENT]x86\_64[/INDENT]  
[/TD]  
[/TR]  
[TR]  
[TD] [INDENT]version\_compile\_os[/INDENT]  
[/TD]  
[TD] [INDENT]Linux[/INDENT]  
[/TD]  
[/TR]  
[/TABLE]  
[INDENT]  
MySql and the XtraBackup are running on the same box.[/INDENT]

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

and get the following result, [INDENT]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.[/INDENT]

I can’t decipher these errors.

ib\_logfile0 exists and is the size reported in the output, [INDENT] [/INDENT]  
[INDENT]# ls -lat ib\_logfile0  
-rw-rw---- 1 mysql mysql 50331648 Sep 17 00:19 ib\_logfile0[/INDENT]

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? [INDENT]

# perror 71

OS error code 71: Protocol error[/INDENT]

Any help would be greatly appreciated.

Ron  
[INDENT] [/INDENT]

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [September 18, 2013, 2:02am UTC](https://forums.percona.com/t/error-doing-first-backup/2945/2 "2013-09-18T02:02:39Z")

</div>

Hi Ron,

As you have given [COLOR=#252C2F]  
nilnandan@nil:~$ perror 2  
OS error code 2: No such file or directory  
nilnandan@nil:~$

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.

---

<div class="post-metadata">

**Author:** ![rdwwdr](https://avatars.discourse-cdn.com/v4/letter/r/7feea3/32.png) [@rdwwdr](https://forums.percona.com/u/rdwwdr)\
**Post date:** [September 18, 2013, 10:11am UTC](https://forums.percona.com/t/error-doing-first-backup/2945/3 "2013-09-18T10:11:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![webmat](https://avatars.discourse-cdn.com/v4/letter/w/3bc359/32.png) [@webmat](https://forums.percona.com/u/webmat)\
**Post date:** [January 7, 2014, 3:41pm UTC](https://forums.percona.com/t/error-doing-first-backup/2945/4 "2014-01-07T15:41:37Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![webmat](https://avatars.discourse-cdn.com/v4/letter/w/3bc359/32.png) [@webmat](https://forums.percona.com/u/webmat)\
**Post date:** [January 8, 2014, 2:43pm UTC](https://forums.percona.com/t/error-doing-first-backup/2945/5 "2014-01-08T14:43:42Z")

</div>

Correction: --defaults-file= is meant to specify a complete config file, not additional parameters.
