I'm trying to setup two database for a single Rails Application. The first one is would be the main database and the second would be there in the case the main database would crash. So, I need to manage the two databases (rake db:create, migrate...) and replicate the datas to the second one. Does anybody know how to do this ?
You should not do that on Application Layer.
Use keepalived or Amazon RDS.