In the past I have used pt-slave-delay when I want to maintain an intentionally delayed replica. Now that I have upgraded to MySQL 5.6 I am switching over to use MASTER_DELAY, which is a built-in feature that does the same thing.
For example I can replace this:
``` pt-slave-delay --delay 7d --interval 1m --daemonize
CHANGE MASTER TO MASTER_DELAY = 604800;
The implementation is similar: the IO thread copies the events to the relay log as fast as normal, but the SQL thread only executes events older than the defined lag. The process to[Read more...]