datadir/bin-logs/binlog.index file is created. It contains entry like ./binlog.000001 instead of ./bin-logs/binlog.000001
Case 2:
pass an absolute binlog path that is descendant of the datadir xtrabackup --log-bin=/home/kamil/repo/ps/8.0/install/ps-node/dn1/bin-logs/binlog --copy-back --force-non-empty-directories --target-dir=/home/kamil/repo/ps/8.0/install/backup --datadir=/home/kamil/repo/ps/8.0/install/ps-node/dn1/
datadir/bin-logs/binlog.index file is created. It contains entry like binlog.000001 instead of ./bin-logs/binlog.000001
Please note that despite of wrong entry in the index file, the server can find and process it in queries like SHOW BINARY LOGS or SHOW BINLOG EVENTS IN. However, binlog_utils_udf plugin is affected (see PXC-4638). I will fix the plugin to handle binlog files in index in the same way as the server code does, but in my opinion PXB should not produce malformed index file anyway.
binlog.index file should contain a list of:
paths of binlog files relative to the data directory
absolute paths of binlog files
however, it produces an entry that is a filename (neither relative nor absolute path)
Steps to reproduce:
Start PS instance
CREATE DATABASE test; USE test;
CREATE TABLE t1 (a int);
FLUSH BINARY LOGS;
INSERT INTO t1 VALUES (0);
Do backup: xtrabackup --backup --target-dir=/home/kamil/repo/ps/8.0/install/backup
Prepare the backup: xtrabackup --prepare --target-dir=/home/kamil/repo/ps/8.0/install/backup
Case 1:
copy-back/move-back: xtrabackup -log-bin=bin-logs/binlog --copy-back --target-dir=/home/kamil/repo/ps/8.0/install/backup --datadir=/home/kamil/repo/ps/8.0/install/ps-node/dn1
datadir/bin-logs/binlog.index file is created. It contains entry like ./binlog.000001 instead of ./bin-logs/binlog.000001
Case 2:
pass an absolute binlog path that is descendant of the datadir
xtrabackup --log-bin=/home/kamil/repo/ps/8.0/install/ps-node/dn1/bin-logs/binlog --copy-back --force-non-empty-directories --target-dir=/home/kamil/repo/ps/8.0/install/backup --datadir=/home/kamil/repo/ps/8.0/install/ps-node/dn1/
datadir/bin-logs/binlog.index file is created. It contains entry like binlog.000001 instead of ./bin-logs/binlog.000001
Please note that despite of wrong entry in the index file, the server can find and process it in queries like SHOW BINARY LOGS or SHOW BINLOG EVENTS IN. However, binlog_utils_udf plugin is affected (see PXC-4638). I will fix the plugin to handle binlog files in index in the same way as the server code does, but in my opinion PXB should not produce malformed index file anyway.