# innobackupex Incremental backup fails on LOCK BINLOG FOR BACKUP...

**URL:** <https://forums.percona.com/t/innobackupex-incremental-backup-fails-on-lock-binlog-for-backup/4003>\
**Category:** Percona XtraBackup\
**Created:** [January 21, 2015, 2:06pm UTC](https://forums.percona.com/t/innobackupex-incremental-backup-fails-on-lock-binlog-for-backup/4003 "2015-01-21T14:06:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffwrule](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jeffwrule/32/1052_2.png) [@jeffwrule](https://forums.percona.com/u/jeffwrule)\
**Post date:** [January 21, 2015, 2:06pm UTC](https://forums.percona.com/t/innobackupex-incremental-backup-fails-on-lock-binlog-for-backup/4003/1 "2015-01-21T14:06:27Z")

</div>

Executing an incremental backup on my database and it failed with the following trace. Any clues to what is wrong.

Backup Version is: 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](http://www.percona.com/xb/p)

Server Version is: Server version: 5.6.21-70.0 Percona Server (GPL), Release 70.0, Revision 688

Command is: innobackupex --compress --incremental /usb/ariel/innobackupex/mysql --incremental-basedir=/usb/ariel/innobackupex/mysql/2015-01-14\_05-51-30

Log Trace is:  
innobackupex: Backing up files ‘/srv/mysql//annotation\_service/\*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}’ (10 files)  
innobackupex: Backing up file ‘/srv/mysql//entrez/db.opt’  
innobackupex: Backing up file ‘/srv/mysql//entrez/gene.frm’

> > log scanned up to (8048683632701)  
> > innobackupex: Backing up file ‘/srv/mysql//entrez/synonym.frm’  
> > 150121 10:38:01 innobackupex: Finished backing up non-InnoDB tables and files

150121 10:38:01 innobackupex: Executing LOCK BINLOG FOR BACKUP…  
DBD::mysql::db do failed: MySQL server has gone away at /usr/bin/innobackupex line 3036.  
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 3039  
main::mysql\_query(‘HASH(0x1df0d20)’, ‘LOCK BINLOG FOR BACKUP’) called at /usr/bin/innobackupex line 3501  
main::mysql\_lock\_binlog(‘HASH(0x1df0d20)’) called at /usr/bin/innobackupex line 2000  
main::backup() called at /usr/bin/innobackupex line 1592  
innobackupex: Error:  
Error executing ‘LOCK BINLOG FOR BACKUP’: DBD::mysql::db do failed: MySQL server has gone away at /usr/bin/innobackupex line 3036.  
150121 10:38:01 innobackupex: Waiting for ibbackup (pid=4074) to finish

---

<div class="post-metadata">

**Author:** ![jeffwrule](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jeffwrule/32/1052_2.png) [@jeffwrule](https://forums.percona.com/u/jeffwrule)\
**Post date:** [January 21, 2015, 3:08pm UTC](https://forums.percona.com/t/innobackupex-incremental-backup-fails-on-lock-binlog-for-backup/4003/2 "2015-01-21T15:08:22Z")

</div>

As a follow-up I found that my SQL server actually restarted in the middle of this. I don’t know if it was b/c of the backup or something else. The mysqld log file just shows the sever rebooting, no other error messages.

---

<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:** [January 22, 2015, 3:02am UTC](https://forums.percona.com/t/innobackupex-incremental-backup-fails-on-lock-binlog-for-backup/4003/3 "2015-01-22T03:02:16Z")

</div>

Hi,

Can you try to run backup again and check if this error is reproducible or not? If yes, then this might be a bug.
