After activating a standby environment, to bring the originally active environment back up, you can, if necessary, rebuild the JetPatch Manager Console and/or database as when setting it up.
Once the originally active environment is available, revert to it as follows:
This procedure overwrites database contents in the original environment, under the assumption that the standby database is current. If this is not the case, following this procedure could result in permanent data loss.
- Stop the standby server by running:
/etc/init.d/tomcat_watchdog stop
/etc/init.d/tomcat stop
/etc/init.d/nginx stop
- On the originally active database host:
- Stop the database by running:
/etc/init.d/postgresql-9.3 stop
- Back up the data directory by renaming it:
mv /var/lib/pgsql/9.3/data /var/lib/pgsql/9.3/data_old
- Recover current data from the standby database by running:
su - postgres
/usr/pgsql-9.3/bin/pg_basebackup -h <standbyDB> -U postgres -D /var/lib/pgsql/9.3/data -X stream -P
where
<standbyDB>
is the IP address or resolvable name of the standby database. - Overwrite the copied configuration files with the backed up ones by running:
cp /var/lib/pgsql/9.3/data_old/postgresql.conf /var/lib/pgsql/9.3/data
cp /var/lib/pgsql/9.3/data_old/pg_hba.conf /var/lib/pgsql/9.3/data
- Stop the database by running:
- On the standby database host:
- Stop the database by running:
/etc/init.d/postgresql-9.3 stop
- Return the database to standby mode by running:
mv /var/lib/pgsql/9.3/data/recovery.done /var/lib/pgsql/9.3/data/recovery.conf
- Start the database by running:
/etc/init.d/postgresql-9.3 start
- Stop the database by running:
- On the active database host, start the database by running:
/etc/init.d/postgresql-9.3 start
- Verify that the databases are running and replicating by inspecting the following directory on both database servers:
/var/lib/pgsql/9.3/data/pg_log
- Copy the following directory and file from the current, standby server to the originally active one:
/usr/share/intigua/package
/usr/share/tomcat/default/conf/intigua.secret
- Start the active server by running:
/etc/init.d/tomcat_watchdog start
/etc/init.d/tomcat start
/etc/init.d/nginx start
- Update DNS records to point to the active server.
Comments
0 comments
Please sign in to leave a comment.