# Xtrabackup replication recepe - missing the bin log file

**URL:** <https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644>\
**Category:** Percona XtraBackup\
**Created:** [May 30, 2017, 7:15am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644 "2017-05-30T07:15:12Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![clouseau](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/clouseau/32/31_2.png) [@clouseau](https://forums.percona.com/u/clouseau)\
**Post date:** [May 30, 2017, 7:15am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/1 "2017-05-30T07:15:12Z")

</div>

Hi,

I’m trying to set up a somple master-slave replication with innobackupex according to recepe:

[url][https://www.percona.com/doc/percona-xtrabackup/2.3/howtos/setting\_up\_replication.html[/url]](https://www.percona.com/doc/percona-xtrabackup/2.3/howtos/setting_up_replication.html%5B/url%5D)

All goes fine, except in when I get to step 5:

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [May 30, 2017, 6:59pm UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/2 "2017-05-30T18:59:49Z")

</div>

Can you share the directory listing of the backup directory after the prepare phase ( after running --apply-log ), or do you have the tool’s log output from when you ran the backup?

---

<div class="post-metadata">

**Author:** ![clouseau](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/clouseau/32/31_2.png) [@clouseau](https://forums.percona.com/u/clouseau)\
**Post date:** [May 31, 2017, 1:45am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/3 "2017-05-31T01:45:53Z")

</div>

> [@jrivera;48584](#):
>
> Can you share the directory listing of the backup directory after the prepare phase ( after running --apply-log ), or do you have the tool’s log output from when you ran the backup?

Hello,

thanks for the reply.

this is the backup’s base dir after --apply-log:

drwxr-x— 10 root root 4096 May 30 14:12 ./  
drwxr-x— 3 root root 4096 May 29 20:54 …/  
-rw-r----- 1 root root 427 May 29 20:45 backup-my.cnf  
drwxr-x— 2 root root 4096 May 29 20:31 bandwidth/  
-rw-r----- 1 root root 2006746 May 29 20:45 ib\_buffer\_pool  
-rw-r----- 1 root root 17326669824 May 30 14:12 ibdata1  
-rw-r----- 1 root root 25769803776 May 30 14:12 ib\_logfile0  
-rw-r----- 1 root root 25769803776 May 30 14:11 ib\_logfile1  
-rw-r----- 1 root root 12582912 May 30 14:12 ibtmp1  
drwxr-x— 2 root root 4096 May 29 20:31 lcn/  
drwxr-x— 2 root root 4096 May 29 20:31 mysql/  
drwxr-x— 2 root root 4096 May 29 20:31 performance\_schema/  
drwxr-x— 2 root root 4096 May 29 20:31 phpmyadmin/  
drwxr-x— 2 root root 4096 May 29 20:31 research\_data/  
drwxr-x— 2 root root 12288 May 29 20:45 sys/  
drwxr-x— 2 root root 16384 May 29 20:45 vt\_api/  
-rw-r----- 1 root root 125 May 30 13:58 xtrabackup\_checkpoints  
-rw-r----- 1 root root 438 May 29 20:45 xtrabackup\_info  
-rw-r----- 1 root root 311558144 May 30 13:58 xtrabackup\_logfile

I didn’t redirect the outputs of innobackupex to a file this time, but it finished without an error, I can tell you as much. If you need it, I can make another backup (takes a little time, as it’s large).

All the best,  
Istvan

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [May 31, 2017, 5:48am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/4 "2017-05-31T05:48:27Z")

</div>

Can you share all innobackupex commands used to backup then prepare (and copy-back?). Also what xtrabackup --version are you using?

---

<div class="post-metadata">

**Author:** ![clouseau](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/clouseau/32/31_2.png) [@clouseau](https://forums.percona.com/u/clouseau)\
**Post date:** [May 31, 2017, 6:30am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/5 "2017-05-31T06:30:24Z")

</div>

Sure, here goes:

[root@vt-api ~]# xtrabackup --version  
xtrabackup version 2.4.7 based on MySQL server 5.7.13 Linux (x86\_64) (revision id: 6f7a799)

innobackupex --user=root --password=something /root/temp/full/  
innobackupex --user=root --password=something --apply-log /root/temp/full/2017-05-29\_19-19-16/

Prior to innobackupex I was just using xtrabackup, but the same thing happend:

xtrabackup --backup --user=root --password=something --target-dir=/root/temp/full  
innobackupex --user=root --password=something --apply-log /root/temp/full/

Thanks,  
Istvan

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [May 31, 2017, 7:23am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/6 "2017-05-31T07:23:07Z")

</div>

do you have binary logging enabled on the source database? I would assume that if there was no xtrabackup\_binlog\_info file only when the backup source was not configured with binary logging enabled.

---

<div class="post-metadata">

**Author:** ![clouseau](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/clouseau/32/31_2.png) [@clouseau](https://forums.percona.com/u/clouseau)\
**Post date:** [June 1, 2017, 1:54am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/7 "2017-06-01T01:54:04Z")

</div>

Binary loging is not enabled. I thought that Xtrabackup would create that instead, whatever it needs (not clarified in that document, actually).

Thanks,  
Istvan

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [June 1, 2017, 7:55am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/8 "2017-06-01T07:55:50Z")

</div>

It was written there actually:  
[url][How to setup a slave for replication in 6 simple steps with Percona XtraBackup](https://www.percona.com/doc/percona-xtrabackup/2.3/howtos/setting_up_replication.html#all-the-things-you-will-need%5B/url%5D)

TheMaster A system with a MySQL-based server installed, configured and running. This system will be called TheMaster, as it is where your data is stored and the one to be replicated. We will assume the following about this system:  
[LIST]  
[_]the MySQL server is able to communicate with others by the standard TCP/IP port;  
[_]the SSH server is installed and configured;  
[_]you have a user account in the system with the appropriate permissions;  
[_]you have a MySQL’s user account with appropriate privileges.  
[\*]server has binlogs enabled and server-id set up to 1.  
[/LIST]

---

<div class="post-metadata">

**Author:** ![clouseau](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/clouseau/32/31_2.png) [@clouseau](https://forums.percona.com/u/clouseau)\
**Post date:** [June 6, 2017, 9:34am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/9 "2017-06-06T09:34:59Z")

</div>

Thanks, I’ve enabled bin-log-ing and set the server id to be 1, as for a replication scenario. Now i got this during running innobackupex:

…  
170606 16:57:31 \>\> log scanned up to (1352647906684)  
InnoDB: Last flushed lsn: 1352646988898 load\_index lsn 1352647910884  
[FATAL] InnoDB: An optimized(without redo logging) DDLoperation has been performed. All modified pages may not have been flushed to the disk yet.  
PXB will not be able take a consistent backup. Retry the backup operation  
2017-06-06 16:57:32 0x7f5a21d9f700 InnoDB: Assertion failure in thread 140025091716864 in file ut0ut.cc line 916  
InnoDB: We intentionally generate a memory trap.  
InnoDB: Submit a detailed bug report to [http://bugs.mysql.com](http://bugs.mysql.com).  
InnoDB: If you get repeated assertion failures or crashes, even  
InnoDB: immediately after the mysqld startup, there may be  
InnoDB: corruption in the InnoDB tablespace. Please refer to  
InnoDB: [url][http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html[/url]](http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html%5B/url%5D)  
InnoDB: about forcing recovery.  
14:57:32 UTC - xtrabackup got signal 6 ;  
This could be because you hit a bug or data is corrupted.  
This error can also be caused by malfunctioning hardware.  
Attempting to collect some information that could help diagnose the problem.  
As this is a crash and something is definitely wrong, the information  
collection process might fail.

Thread pointer: 0x0  
Attempting backtrace. You can use the following information to find out  
where mysqld died. If you see no messages after this, something went  
terribly wrong…  
stack\_bottom = 0 thread\_stack 0x10000  
innobackupex(my\_print\_stacktrace+0x2c)[0xcebdcc]  
innobackupex(handle\_fatal\_signal+0x262)[0xa03072]  
/lib64/libpthread.so.0(+0xf370)[0x7f5a261e4370]  
/lib64/libc.so.6(gsignal+0x37)[0x7f5a23ee31d7]  
/lib64/libc.so.6(abort+0x148)[0x7f5a23ee48c8]  
innobackupex[0x6f2e09]  
innobackupex(\_ZN2ib5fatalD1Ev+0xee)[0x8d912e]  
innobackupex[0x80b28b]  
innobackupex(\_Z19recv\_parse\_log\_recsm7store\_tb+0x404)[0x80fab4]  
innobackupex[0x71b210]  
innobackupex[0x71eaf9]  
innobackupex[0x71efe3]  
/lib64/libpthread.so.0(+0x7dc5)[0x7f5a261dcdc5]  
/lib64/libc.so.6(clone+0x6d)[0x7f5a23fa573d]

Please report a bug at [url][https://bugs.launchpad.net/percona-xtrabackup[/url]](https://bugs.launchpad.net/percona-xtrabackup%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![clouseau](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/clouseau/32/31_2.png) [@clouseau](https://forums.percona.com/u/clouseau)\
**Post date:** [June 7, 2017, 8:40am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/10 "2017-06-07T08:40:19Z")

</div>

I don;t think that the table is corrupted (although it’s an enormous database - cca 50Gb), because the backup (and the db itself) works well when doing it without binlogs

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [July 3, 2017, 7:09am UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/11 "2017-07-03T07:09:49Z")

</div>

[FATAL] InnoDB: An optimized(without redo logging) DDLoperation has been performed. All modified pages may not have been flushed to the disk yet.

It looks like a DDL (ALTER TABLE) was executed at the time when backup was in progress. we highly recommend not to run any DDLs when backups are in progress.

---

<div class="post-metadata">

**Author:** ![Subodh](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Subodh](https://forums.percona.com/u/Subodh)\
**Post date:** [July 3, 2017, 12:39pm UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/12 "2017-07-03T12:39:26Z")

</div>

Have a similar question, I have master → Slave setup and have taken the master DB backup using innobackupex.  
I get all the data and the xtrbabackup\_checkpoint values created as mentioned in [url][https://www.percona.com/doc/percona-xtrabackup/LATEST/backup\_scenarios/incremental\_backup.html[/url]](https://www.percona.com/doc/percona-xtrabackup/LATEST/backup_scenarios/incremental_backup.html%5B/url%5D) with an exception of  
recover\_binlog\_info = 0 Should it copy the last bin-log file the slaves are referring so that once the master is brought back slave can see the bin-log file and start replicating?  
If not we need to rebuild all the slaves again.

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [July 3, 2017, 11:12pm UTC](https://forums.percona.com/t/xtrabackup-replication-recepe-missing-the-bin-log-file/5644/13 "2017-07-03T23:12:16Z")

</div>

[Subodh](https://percona.vanillacommunities.com/profile/x/x/23868) the recover\_binlog\_info option based on source code relates to whether xtrabackup\_binlog\_info file will be created on recovery.

[url][percona-xtrabackup/xtrabackup.cc at 8aedd6ce92c38e5a08c93adccf9274c7835dd552 · percona/percona-xtrabackup · GitHub](https://github.com/percona/percona-xtrabackup/blob/8aedd6ce92c38e5a08c93adccf9274c7835dd552/storage/innobase/xtrabackup/src/xtrabackup.cc#L404%5B/url%5D)
