# Xtrabackup: error: log block numbers mismatch

**URL:** <https://forums.percona.com/t/xtrabackup-error-log-block-numbers-mismatch/10962>\
**Category:** Percona XtraBackup\
**Created:** [June 21, 2021, 2:59pm UTC](https://forums.percona.com/t/xtrabackup-error-log-block-numbers-mismatch/10962 "2021-06-21T14:59:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daljit1](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@Daljit1](https://forums.percona.com/u/Daljit1)\
**Post date:** [June 21, 2021, 2:59pm UTC](https://forums.percona.com/t/xtrabackup-error-log-block-numbers-mismatch/10962/1 "2021-06-21T14:59:19Z")

</div>

Hi,

I upgraded 2.4.18 but getting same error while backup.

“xtrabackup: error: log block numbers mismatch:  
xtrabackup: error: expected log block no. 243298896, but got no. 268464708 from the log file.  
xtrabackup: error: it looks like InnoDB log has wrapped around before xtrabackup could process all records due to either log copying being too slow, or log files being too small.  
xtrabackup: Error: xtrabackup\_copy\_logfile() failed.  
Error taking full backup”

We are maintaining backup on slave and I noticed backup completed if slave process not running. (slave stop)

Any idea please suggest me on it.

regards,  
Daljit Singh

---

<div class="post-metadata">

**Author:** ![Eduardo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/eduardo/32/2416_2.png) [@Eduardo](https://forums.percona.com/u/Eduardo)\
**Post date:** [June 22, 2021, 7:13am UTC](https://forums.percona.com/t/xtrabackup-error-log-block-numbers-mismatch/10962/2 "2021-06-22T07:13:17Z")

</div>

Hello Daljit,

Generally speaking, this error means that the bin log file rotates before xtrabackup can copy it. XtraDB and InnoDB write to the redo log files cyclically so that the oldest log data is overwritten with the newer. The innodb\_log\_file\_size \* innodb\_log\_files\_in\_group is too small for the amount of changes your system produces.

That is why when you stop replication, writing to the redolog stops, and the backup completes successfully.

You will need to increase the variable innodb\_log\_file\_size. In version 5.6 and earlier, you must do the operation carefully; I recommend you review this entry on our blog [How to Change innodb\_log\_file\_size - Percona Database Performance Blog](https://www.percona.com/blog/2011/07/09/how-to-change-innodb_log_file_size-safely/). For version 5.7 and later, it is much easier; you can check the procedure here [MySQL :: MySQL 5.7 Reference Manual :: 14.6.6 Redo Log](https://dev.mysql.com/doc/refman/5.7/en/innodb-redo-log.html)

I also suggest you look at this blog post to determine how to calculate the optimal size of innodb\_log\_file\_size. [How to calculate a good InnoDB log file size - Percona Database Performance Blog](https://www.percona.com/blog/2008/11/21/how-to-calculate-a-good-innodb-log-file-size/)

Regards,  
Eduardo

---

<div class="post-metadata">

**Author:** ![Daljit1](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@Daljit1](https://forums.percona.com/u/Daljit1)\
**Post date:** [June 22, 2021, 4:32pm UTC](https://forums.percona.com/t/xtrabackup-error-log-block-numbers-mismatch/10962/4 "2021-06-22T16:32:14Z")

</div>

Hi Eduardo,

Appreciated quick and good response!!

Below are the current configuration of parameter in my system.  
innodb\_log\_file\_size=4 GB  
innodb\_log\_files\_in\_group=3  
Database size is 3.5 TB

So i going to plan to increase the size innodb\_log\_file\_size=15 GB withthree group.  
i.e.  
innodb\_log\_file\_size=15 GB  
innodb\_log\_files\_in\_group=3

Please let me know it will be fine.

regards,  
Daljit Singh

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [June 28, 2021, 10:58am UTC](https://forums.percona.com/t/xtrabackup-error-log-block-numbers-mismatch/10962/5 "2021-06-28T10:58:56Z")

</div>

You can also invoke xtrabackup with `--safe-slave-backup` . This option will stop replica applier thread, which will make your redo log stable during the time of backup. It will re-enable the applier thread once the backup is completed.
