While operating Innobackupex today, I found Xtrabackup_binlog_pos_innodb xtrabackup_binlog_info two files corresponding to the master's BI Nary log Location inconsistency:
Less Xtrabackup_binlog_info mysql-bin.002961 70176740
Less Xtrabackup_binlog_pos_innodb mysql-bin.002961 38716155
I'm going to find out what the difference is between the two parameters.
1. Definition of official website:
Xtrabackup_binlog_pos_innodb containing the position of the binary log at the moment of backing up relative into NODB transactions;
Xtrabackup_binlog_info containing the position of the binary log at the moment of backing up;
2. Other people's narration:
This is another person's blog: http://julyclyde.org/?p=403
3. A practice on the official web site:
How to
setup a Slave for replication in 6 simple steps with Percona xtrabackup
4. Personal Understanding:
1) The official online demo is Cat/var/lib/mysql/xtrabackup_binlog_info themaster-bin.000001 481, and is the first binary log, so it is possible Xtrabackup_binlog_pos_innodb Xtrabackup_binlog_info records the same binary location.
Xtrabackup_binlog_info recorded mysql-bin.002961 70176740来 perform change master to * * * master_log_file= ' mysql-bin.002961 ', master _log_pos=70176740 * * *, found the following error while performing the show slave status \g:
Last_io_error:got fatal Error 1236 from master when reading data from binary log: ' Client requested Master to start repli cation from impossible position; The first event ' mysql-bin.002961 ' at 70176740, the last event read from '/home/mysql/node-2/mysql-bin.002961 ' at 4, the L AST byte read from '/home/mysql/node-2/mysql-bin.002961 ' at 4. '
38716155 executed the following command, after start slave, the result shows normal,
Change Master to * * * master_log_file= ' mysql-bin.002961 ', master_log_pos=38716155***
I use the version is Xtrabackup-1.6.7, from this can be seen, to ensure that there are InnoDB transactions can be normal from the master to obtain binary log, should be in accordance with Xtrabackup_binlog_pos _innodb, and did not xtrabackup_binlog_info this file.
$ lsibdata1 mysql mysqld.log mysqld-relay-bin.index relay-log.info ***ib_ Logfile0 mysql-bin.000001 mysqld.pid mysqld.sock test ****ib_logfile1 MySQL-bin.000002 mysqld-relay-bin.000006 mysql-slow.log * * * Xtrabackup_binlog_ Pos_innodbmaster.info mysql-bin.index mysqld-relay-bin.000007 Performance_schema * * * xtrabackup_checkpoints
5. My usual Practice:
Xtrabackup_binlog_pos_innodb binary log position. Then execute the Change Master command. Today occasionally to see the backup directory has two xtrabackup_binlog_pos related files, the results are inconsistent, resulting in the above error.
6. Personal Summary:
Maybe I'm using a lower version of the reason, the explanation on the higher version is as follows
http://www.percona.com/ doc/percona-xtrabackup/2.1/xtrabackup_bin/working_with_binary_logs.html
http://www.percona.com/doc/ percona-xtrabackup/1.6/xtrabackup_bin/working_with_binary_logs.html
If your backup is from a server with binary logging en abled, Xtrabackup would create a file named Xtrabackup_binlog_info in the target directory. This file contains the binary log file name and position of the exact point in the binary log to which the prepared backup Corresponds. You'll also see output similar to the following during the prepare stage: .....
This output can also is found in the Xtrabackup_binlog_pos_innodb file, but it I s only correct if no other than XtraDB or InnoDB is used as storage engines. If Other storage engines is used (i.e. MyISAM), you should use the Xtrabackup_binlog_info file to retrieve the position.< /span>
This is the Xtrabackup 2.1 above explanation (1.6 above is also similar), this meaning and I understand exactly the opposite, they recommend to use the xtrabackup_binlog_info above recorded binary log location, but in fact I always use is Xtrabackup_binlog_pos_innodb (in most cases two files are recorded in the same location) and is not missed.
Personal feeling adopt Xtrabackup_binlog_pos_innodb, do not know which position you adopt? If there is any doubt, we can put forward to discuss together.
MySQL backup software xtrabackup xtrabackup_binlog_pos_innodb and xtrabackup_binlog_info file differences