Reputation: 59
I'm currently migrating my servers on Amazon EC2 and RDS and I can't find out how to create a replica of my production DB instance to a development DB instance.
Basically what I would like to do is have a replication occurring everyday or week to be able to work on almost actual data on my development environment.
Of course the multi-AZ option wouldn't work in this context since this is not for fail-over and the replication should only go in one direction (prod -> dev) to prevent any insertion of test data or any loss on the production server.
Upvotes: 0
Views: 725
Reputation: 10033
If your database is rather small, you can run the following command from a cron job:
mysqldump --host=<RDS endpoint> --user=<username> --password=<password> mydatabase > | mysql --host=<dev server or dev RDS instance> --user=<username> --password=<password> mydatabase
This will dump the "mydatabase" DB from RDS and pipe it into a "mydatabase" DB on another host. You can't run cron jobs on RDS, so this will have to run on a stand-alone server or EC2 instance.
Upvotes: 1
Reputation: 805
I would check out http://www.skeddly.com/
I know it can do automated RDS snapshots, perhaps you can set up a custom action type to load the snapshots on your Dev RDS instance somehow.
Upvotes: 0