MySQL - Is there a way to include the bin log position in the dump file without scripting
Asked Answered
B

1

5

Is there a way to include the replication bin log position in the dump file without scripting?

I know there are ways through scripting, appending a line to the dump file etc. But I remember once reading that it's possible through a simple argument in mysqldump, is that true and if yes what's the syntax?

Thanks a lot

Bookman answered 19/8, 2012 at 8:21 Comment(0)
B
15

Great, I've found the answer:

the --master-data option allows this

mysqldump --master-data=1 ... needs to be run on the master and will include a sql that will change the MySQL instance's master to the current file/log position automatically.

if 2 is used instead of 1 then it only writes a comment, which is also useful for manual setups...

Bookman answered 19/8, 2012 at 8:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.