# XtraBackup fails when locking tables

**URL:** <https://forums.percona.com/t/xtrabackup-fails-when-locking-tables/3161>\
**Category:** Percona XtraBackup\
**Created:** [December 21, 2013, 11:16am UTC](https://forums.percona.com/t/xtrabackup-fails-when-locking-tables/3161 "2013-12-21T11:16:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vuther](https://avatars.discourse-cdn.com/v4/letter/v/e36b37/32.png) [@vuther](https://forums.percona.com/u/vuther)\
**Post date:** [December 21, 2013, 11:16am UTC](https://forums.percona.com/t/xtrabackup-fails-when-locking-tables/3161/1 "2013-12-21T11:16:16Z")

</div>

Hello,

I’ve been trying to use XtraBackup to slave my primary database server and whenever it gets to the locking part for the slave information it fails.

Command: innobackupex --compress --compress-threads=8 --parallel=8 --slave-info --user=user --password=pass --stream=xbstream ./ | ssh user@host “xbstream -x -C /mysql/backup/”

Xtrabackup ver: 2.0.6

Results:  
120709 09:36:51 innobackupex: Starting to lock all tables…

> > log scanned up to (13444798539790)  
> > innobackupex: Error: mysql child process has died: ERROR 1205 (HY000) at line 7: Lock wait timeout exceeded; try restarting transaction  
> > while waiting for reply to MySQL request: ‘FLUSH TABLES WITH READ LOCK;’ at /usr//bin/innobackupex line 374.

I’ve tried this now about 4 times and each time it does this. Does anyone have any idea why it would continue to do this?

Thanks!

---

<div class="post-metadata">

**Author:** ![mirfan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mirfan/32/16890_2.png) [@mirfan](https://forums.percona.com/u/mirfan)\
**Post date:** [December 23, 2013, 2:54am UTC](https://forums.percona.com/t/xtrabackup-fails-when-locking-tables/3161/2 "2013-12-23T02:54:10Z")

</div>

what version of xtrabackup you are running ?  
The most likely cause is that you have long running SELECT may be which preventing FTWRL to accquire ? Check this thread [url][Redirecting to Google Groups](https://groups.google.com/forum/#!msg/percona-discussion/xqwCZuoP8x0/mLmlsJq5jNkJ%5B/url%5D)

Hope it helps.

---

<div class="post-metadata">

**Author:** ![vuther](https://avatars.discourse-cdn.com/v4/letter/v/e36b37/32.png) [@vuther](https://forums.percona.com/u/vuther)\
**Post date:** [December 23, 2013, 8:48am UTC](https://forums.percona.com/t/xtrabackup-fails-when-locking-tables/3161/3 "2013-12-23T08:48:46Z")

</div>

Mirfan,

Thanks for the response. I’m using version 2.0.6. I checked all three nodes when it started to lock tables and there was no running long SELECTs. I tried to back it up again last night and it keeps saying the same thing.

Thanks

---

<div class="post-metadata">

**Author:** ![mixa](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mixa/32/16881_2.png) [@mixa](https://forums.percona.com/u/mixa)\
**Post date:** [December 25, 2013, 2:00pm UTC](https://forums.percona.com/t/xtrabackup-fails-when-locking-tables/3161/4 "2013-12-25T14:00:36Z")

</div>

Interesting, but I see the bug reported with same info some time ago:  
[url][https://bugs.launchpad.net/percona-xtrabackup/+bug/1022874[/url]](https://bugs.launchpad.net/percona-xtrabackup/+bug/1022874%5B/url%5D)

But I can’t see any solutions or workarounds here…
