Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

With MySQL 5.6, Is there any way to keep a replication slave X seconds behind_the_master?

$
0
0

It'd be really nice for disaster recovery to be able to set this up. We are doing snapshots, but this seems like it'd be a really nice backup to have. For example, I'd like to always keep a replicated slave 30 minutes behind our master, so that we could have a sort of live backup all the time.

This is a secondary replicated server, as ypercube points out -- if you only have a single replicated server, running it 30 minutes behind would mean you'd potentially lose 30 minutes of data in the case of the master crashing.

Although I suspect the relevant binlogs for those 30 minutes of binlog events would actually be stored on the slave (and just not processed until it was 30 minutes behind), so I'm thinking that I wouldn't actually, even if this were the only slave.

I'll be doing some testing to confirm this behavior, as it is relevant for some potential use-cases for us. I'll update this later.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>