How do I obtain the binary log position of the master via xtrabackup ?

1,012 views
Skip to first unread message

nikita

unread,
Jan 3, 2012, 3:09:57 AM1/3/12
to percona-d...@googlegroups.com
Hello, 

When I am performing a full backup on the master, I also want to obtain the binary log position at the time
of the backup. I don't see any options in xtrabackup for doing this ? If I have to programmatically obtain it via
instructions in http://goo.gl/0R3fR do I perform it after the execution of xtrabackup or before ? Thanks

N

Da

unread,
Jan 3, 2012, 6:35:39 AM1/3/12
to percona-d...@googlegroups.com
I am using innobackupex and it automatically creates two files, one with master position and another with slave position (I am using the slave-info option).
xtrabackup_slave_info
xtrabackup_binlog_info



N

--
You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/percona-discussion/-/7U5rTlqJK9AJ.
To post to this group, send email to percona-d...@googlegroups.com.
To unsubscribe from this group, send email to percona-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/percona-discussion?hl=en.

nikita

unread,
Jan 3, 2012, 11:28:27 PM1/3/12
to percona-d...@googlegroups.com
Dan,

From the docs, this is what it says about the --slave-info option:-

«This option is useful when backing up a replication slave server. It prints the binary log position and name of the master server.»

Do you run this on the master or the slave ?

Thanks

N

Da

unread,
Jan 4, 2012, 7:54:06 AM1/4/12
to percona-d...@googlegroups.com
Yes you are right! I am always using it on a slave,...
Anyway, the info you are looking for is not the slave position, but the master position. Using innobackup I get two different files, one with the slave info named "xtrabackup_slave_info" wich contents something like:

CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.003822', MASTER_LOG_POS=16993157

And another with the name "xtrabackup_binlog_info" wich contents something like:

mysql-bin.000027    23424718        bbdd1,mysql

I guess you are looking for that seconf file. This is the one I use to sync a slave with the master I backed from. As I understand this info is the last binlog and the last position on the master where you are doing the backup.

As I am allways backing from the slave, I am not sure if that seccond file exists without using the --slave-info option. If it doesn't just try to add the option and see what happens...


Thanks

N

--
You received this message because you are subscribed to the Google Groups "Percona Discussion" group.

deepcell

unread,
Dec 7, 2014, 2:54:05 AM12/7/14
to percona-d...@googlegroups.com
Open your file /opt/lampp/etc/my.cnf (xampp) or /etc/mysql/my.cnf and uncomment the following line:

log-bin=mysql-bin

That's it, now when you run innobackupex the file named xtrabackup_binlog_info will be created along the other files.

Sym

unread,
May 6, 2018, 3:53:43 AM5/6/18
to Percona Discussion
I got some problem.
I don't know why my slave_info is empty

# cat xtrabackup_slave_info
CHANGE MASTER TO MASTER_LOG_FILE='', MASTER_LOG_POS=0;

by right should have value right?
Reply all
Reply to author
Forward
0 new messages