0

We got a system with a Mysql database and a replication on a slave database. We got huge uploads, which will do major changes to the master database. We want to keep the slave database the old version before the changes for a certain while.

Is it possible to set up the replication update to a certain time shift?

  • Sure, just schedule START SLAVE and STOP SLAVE at the appropriate times. – user207421 Nov 12 '15 at 20:46
1

As EJP say you can work manually using the stop/start slave, so you can stop replication using:

mysql> STOP SLAVE;

than resume when your checks are finished using:

mysql> START SLAVE;

Alternatively you can manage the delay of a replica using the MySQL Delayed Replication, note that this feature is available only on 5.6.x + MySQL version.

I think that a good idea where to start (but there are many configuration for your scenario) is to have 2 node attached in replica, one standard replica and one delayed replica:

Master
`--- Standard Replica
`--- Delayed Replica 

In this configuration you have all the advantages in case of a master crash(promoting the standard replication) and all the advantages for checking your "past" :) and/or a point in time recovery

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy