Switchback
To switchback from Secondary to Primary server:
-
Go to the DR Server and stop the following services in the given order: Tomcat, ActiveMQ, and PostgreSQL.
-
Copy AE directories, AE_HOME/* to the corresponding location on the Primary server.
-
Copy ActiveMQ’s data directory to Primary server in ACTIVEMQ_HOME/.
-
Complete the following steps to rebuild the Primary node, which was a failure:
i. Take down the Postgresql-X64-14 service of the new Primary node.
ii. After basic installation of postgresql-14-windows on the old Primary node, copy files from C:\Program Files\Postgresql\14\data of new Primary node to the old Primary node.
iii. Check the permissions of the old Primary with the new Primary.
iv. Start the Postgresql-X64-14 service on old Primary.
-
Complete the following steps to rebuild the Standby node:
i. Restore backup files from standby_bkp directory on Standby node by copying the configuration files from C:\Program Files\Postgresql\14\ Standby_Bkp \Postgresql.conf, Pg_Hba.conf, Recovery.conf to C:\Program Files\Postgresql\14\data on the same server.
ii. Restart the Postgresql-X64-14 service on the Primary node and start the Postgresql-X64-14 service on the Standby node.
iii. Check the recovery status with the following command:
select pg_is_in_recovery();
The following two recovery statuses are available: t: indicates read-only mode f: indicates read-write mode The status should be t.iv. Use the following query to check the DB size: Select Pg_Size_Pretty (Pg_Database_Size('Db_Name'));
Select Pg_Size_Pretty(Pg_Database_Size('Db_Name'));
-
Start ActiveMQ, PostgreSQL, and Tomcat services on the Primary server. Check that the Primary server is running fine.