Xtrabackup fails if log_bin_index is defined in my.cnf
Description
AFFECTED CS IDs
Smart Checklist
Activity

Jaime Sicam December 21, 2021 at 4:18 AM
This is still an issue with Percona Server 8.0.26 and Percona Xtrabackup 8.0.26:
SHOW MASTER LOGS output:
Contents of index.txt:
Backup process:
Brad Ash September 21, 2019 at 3:19 PM
@sergei.glushchenko I see this is marked as resolved in 8.0.6, but I have the same issue in 8.0.7
My bin log index is set in mysqlcnf.d to a custom filelog_bin_index =/var/log/mysql/mysql-bin.log.index
and unless I explicitly pass --log-bin-index=/var/log/mysql/mysql-bin.log.index
, I get this error at the end of my xtrabackup
xtrabackup: Error cannot find current log file in the '/var/log/mysql/mysql-bin.index'
Xtrabackup - xtrabackup version 8.0.7 based on MySQL server 8.0.16 Linux (x86_64) (revision id: 069e0e6)
MySQL - Ver 8.0.17 for Linux on x86_64 (MySQL Community Server - GPL)

Sergei Glushchenko March 5, 2019 at 8:43 PM
Workarounds are:
edit my.cnf (add .index to log-bin-index, or override log-bin-index in [xtrabackup])
run backup with --no-defaults and specify username, socket, etc via command line
pass --log-bin-index via command line (with .index)
With XtraBackup 8.0.5 if we have log_bin_index defined in my.cnf the backup will fail with:
The problem is that xtrabckup is not appending the .index extension to the value from my.cnf in write_current_binlog_file(), like MySQL does normally.
To reproduce simply setup a MySQL 8.0.15 and setup binary logging like:
And then backup with XtraBackup 8.0.5: