I'm planning on creating a sandbox system of a production rails app for potential clients to mess around with.
The production system is continuously being updated with new content which I'd like to bring over to the sandbox to make it as real as possible. However, I don't want to nuke the sandbox by doing a full db dump / restore as I'd like to preserve the user accounts on this system (just update with the new content)
I've checked out a couple of options but I could use some advice...
1- DB Dump / Restore
While it's simple in terms of how it works it's a bit of a pain to configure with cron jobs and transferring the whole db between servers even though I may not need it. I guess I can just dump certain tables but this will still probably transfer more data than required.
2- DB Replication
Setting up master-slave replication on a per table basis. From what I can see, this might be want I want to do. Replicate just the new content tables and ignore account tables.
3- Another way?
I'm not sure... is there a better way to be doing this?
But wait, there's more!
The sandbox system is not always running (it's only available during certain hours) so I need something that won't get too upset if it can't connect. Just quietly fail and try again later.
I'm pretty new to replication so does anyone have a recommandation of where to get started? Slony-I, Bucardo, rubyrep?
Details
- Rails 3 app
- PostgreSQL DB
- Ubuntu server