I have two Postgres databases on the same server, which have the same schemas.
The goal is to have DB1 as the production and DB2, as the database that will receive all the data that is migrated from a MySQL db, and then use the dump created after the migration on DB2 to restore the DB1. In other words, dump DB2 and use this dump to perform a restore on DB1.
This would allow to have the production DB1 “always” available even when the migration process is taking place on DB2.
My question is, is it possible to use the DB2 dump to restore the DB1? Or should a different strategy be used –
like renaming the databases?
Thank You