Xtrabackup: error: log block numbers mismatch


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.

Daljit Singh

1 Like

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. 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

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


1 Like

Hi Eduardo,

Appreciated quick and good response!!

Below are the current configuration of parameter in my system.
innodb_log_file_size=4 GB
Database size is 3.5 TB

So i going to plan to increase the size innodb_log_file_size=15 GB withthree group.
innodb_log_file_size=15 GB

Please let me know it will be fine.

Daljit Singh

1 Like

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.