Let's start by listing some facts:
- Elasticache can't be a slave of my existing Redis setup. Real shame, that would be so much more efficent.
- I have only one Redis server to migrate, with roughly 3gb of data.
- Downtime must be less than 10 mins. I assume the usual "stop the site, stop redis, provision cluster with snapshot" will take longer than this.
Similar to this question: How do I set an elasticache redis cluster as a slave?
One idea on how this might work:
- Set Redis to use an AOF and trigger BGSAVE at the same time.
- When BGSAVE finishes, provision the Elasticache cluster with RDB seed.
- Stop the site and shut down my local Redis instance.
- Use an aof-replay tool to replay the AOF into Elasticache.
- Start the site again, pointed at the Elasticache cluster.
My questions:
- How can I guarantee that my AOF file begins at exactly the point the RDB file ends, and that no data will be written in between?
- Is there an AOF tool supported by the maintainers of Redis, or are they all third-party solutions, and therefore (potentially) of questionable reliability?*
* No offence intended to any authors of such tools, I'm sure they're great, I just feel much more confident using a tool written by the same team as the product to avoid potential compatibility bugs.