Encountering "log block numbers mismatch" errors with Xtrabackup can be daunting. This guide outlines a simple solution to this common issue, ensuring your backup processes remain uninterrupted.
When you see errors in the logfiles like:
xtrabackup: Error: xtrabackup_copy_logfile() failed.
xtrabackup: error: it looks like InnoDB log has wrapped around before xtrabackup could process all records due to either log copying being too slow
xtrabackup: error: expected log block no. 265194371, but got no. 265235315 from the log file.
xtrabackup: error: log block numbers mismatch:
It signifies that xtrabackup is unable to keep up with the log writing activity on the server, causing the log to wrap around before xtrabackup can copy the records before they are overwritten.
To mitigate this issue, consider flagging the "Don't lock tables" option in your server configuration. This workaround helps xtrabackup process records efficiently, avoiding the "log block numbers mismatch" error.