I have two postgres databases.
Master = master_database Slave = database
All initial changes are made to master. Upon admin approval, the version is updated, and I want all changes to be copied to slave. I looked into using octupos, rubyrep, etc. but I don't want an automatic replication.
I'd like to add a rake task that is executed only when the version is updated.
I've tried using pg_dump and pg_restore, but I get error messages saying that:
ERROR: relation "whatever" already exists ~ OR ~ ERROR: multiple primary keys for table "whatevers" are not allowed
pg_restore
with--clean
, but it'll drop all the tables before re-creating them so you'll want to be sure there's no important data there. – Craig Ringer Jul 4 at 0:46