Is there a way I can take mysql dump from a specific point in time until the latest?

Let me explain the need of such requirement, maybe someone could suggest a better option:

I took a mysqldump (DUMP) from a database AA which I want to import into three new databases A, B and C. At the same I would want to setup a master-slave replication with A being the master and B, C the slave. I started importing the DUMP a week back on A, B but forgot to do the same on C as the server C was not ready at that point of time. The import has ran successfully on A and B (But it took about a week to run) and I just started the import on C. Due to the time constraints I need to put atleast one of these three Databases in service, preferably the master A. So what I thought was, I could put A into service and then once the import is complete on C, I can then freeze A so that no other application writes on A and take mysqldump of the data which was written for the past week and import them on B and C. At this point of time all the three servers (A, B and C) are in the same state and now I can set up the replication.

Is there a way I can take mysqldump just for a specific time?


1 Answer 1


Let's say you start now server A (as a master) and B (as a slave). There is no issue with starting server C (as a slave) a week later, the same way you setup B now. It will take some time for C to catch up with A but this will work the same way as B.

But isn't it a good practice to have all of them in the same state before starting the replication? –

It might be faster that way but you don't have to. You can even start server C a year later. if server A has kept all binlog files, C will have to replay them all but it will eventually catch up, too. Of course, in that case, (a year later) it will probably be faster to take a dump at that time from A, import at C and start replication from that point. - https://dba.stackexchange.com/users/993

To clarify, the servers do have to start with identical data from a fixed point in time, but as long as you know the binlog coordinates of a given dump of server A, and no logs have been purged, you can restore the dump elsewhere and play forward from there using master A's logs, however much later that may be... but identical data is essential. – https://dba.stackexchange.com/users/11651

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.