Empty xtrabackup_slave_info file is created if --slave info passed with master server

Bug #1734689 reported by Shahriyar Rzayev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
2.4
Confirmed
High
Unassigned

Bug Description

Testing latest 2.4 and 2.4 branch.
Taking backup with 2.4 + PS 5.6 master server:

/home/shahriyar.rzaev/XB_TEST/server_dir/target/percona-xtrabackup-2.4.x-debug/bin/xtrabackup --defaults-file=/home/shahriyar.rzaev/sandboxes/rsandbox_Percona-Server-5_6_36/master/my.sandbox.cnf --user=root --password=msandbox --target-dir=/home/shahriyar.rzaev/XB_TEST/backup_dir/ps_5_7_x_2_4/full/2017-11-27_11-35-36 --backup --socket=/tmp/mysql_sandbox23901.sock --slave-info --no-version-check --core-file --parallel=10 --throttle=40 --keyring-file-data=/home/shahriyar.rzaev/XB_TEST/server_dir/PS231117-5.7.20-18-linux-x86_64-debug/mysql-keyring/keyring

The result:

xtrabackup: The latest check point (for incremental): '1632376'
xtrabackup: Stopping log copying thread.
.171127 12:58:32 >> log scanned up to (1632376)

171127 12:58:32 Executing UNLOCK BINLOG
171127 12:58:32 Executing UNLOCK TABLES
171127 12:58:32 All tables unlocked
171127 12:58:32 Backup created in directory '/home/shahriyar.rzaev/XB_TEST/backup_dir/ps_5_7_x_2_4/full/2017-11-27_11-35-36/'
MySQL binlog position: filename 'mysql-bin.000002', position '151', GTID of the last change ''
171127 12:58:32 [00] Writing /home/shahriyar.rzaev/XB_TEST/backup_dir/ps_5_7_x_2_4/full/2017-11-27_11-35-36/backup-my.cnf
171127 12:58:32 [00] ...done
171127 12:58:32 [00] Writing /home/shahriyar.rzaev/XB_TEST/backup_dir/ps_5_7_x_2_4/full/2017-11-27_11-35-36/xtrabackup_info
171127 12:58:32 [00] ...done
xtrabackup: Transaction log of lsn (1632369) to (1632376) was copied.
171127 12:58:33 completed OK!

In backup directory:

$ ls
backup-my.cnf ibdata1 mysql performance_schema test xtrabackup_binlog_info xtrabackup_checkpoints xtrabackup_info xtrabackup_logfile xtrabackup_slave_info
$ cat xtrabackup_slave_info
$ ls -ltr xtrabackup_slave_info
-rw-r----- 1 shahriyar.rzaev shahriyar.rzaev 0 Noy 27 12:58 xtrabackup_slave_info

Doing same thing with PXB 2.3 + PS 5.6:

/home/shahriyar.rzaev/XB_TEST/server_dir/target/percona-xtrabackup-2.3.x-debug/bin/xtrabackup --defaults-file=/home/shahriyar.rzaev/sandboxes/rsandbox_Percona-Server-5_6_36/master/my.sandbox.cnf --user=root --password=msandbox --target-dir=/home/shahriyar.rzaev/XB_TEST/backup_dir/ps_5_7_x_2_4/full/2017-11-27_11-35-36 --backup --socket=/tmp/mysql_sandbox23901.sock --slave-info --no-version-check --core-file --parallel=10 --throttle=40 --keyring-file-data=/home/shahriyar.rzaev/XB_TEST/server_dir/PS231117-5.7.20-18-linux-x86_64-debug/mysql-keyring/keyring

171127 13:03:01 Executing LOCK BINLOG FOR BACKUP...
Failed to get master binlog coordinates from SHOW SLAVE STATUS
This means that the server is not a replication slave. Ignoring the --slave-info option
171127 13:03:01 [00] Writing xtrabackup_binlog_info
171127 13:03:01 [00] ...done
171127 13:03:01 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '1632383'
xtrabackup: Stopping log copying thread.
.171127 13:03:01 >> log scanned up to (1632383)

171127 13:03:02 Executing UNLOCK BINLOG
171127 13:03:02 Executing UNLOCK TABLES
171127 13:03:02 All tables unlocked
171127 13:03:02 Backup created in directory '/home/shahriyar.rzaev/XB_TEST/backup_dir/ps_5_7_x_2_4/full/2017-11-27_11-35-36/'
MySQL binlog position: filename 'mysql-bin.000002', position '151', GTID of the last change ''
171127 13:03:02 [00] Writing backup-my.cnf
171127 13:03:02 [00] ...done
171127 13:03:02 [00] Writing xtrabackup_info
171127 13:03:02 [00] ...done
xtrabackup: Transaction log of lsn (1632376) to (1632383) was copied.
171127 13:03:02 completed OK!

There is no xtrabackup_slave_info file inside backup dir:

$ ls
backup-my.cnf ibdata1 mysql performance_schema test xtrabackup_binlog_info xtrabackup_checkpoints xtrabackup_info xtrabackup_logfile

Also please note the difference between outputs:
With 2.3 there is a note about ignoring --slave-info:

171127 13:03:01 Executing LOCK BINLOG FOR BACKUP...
Failed to get master binlog coordinates from SHOW SLAVE STATUS
This means that the server is not a replication slave. Ignoring the --slave-info option
171127 13:03:01 [00] Writing xtrabackup_binlog_info

With 2.4 there is no such thing.

Tags: qa
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-517

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.