Synchronize Environments
Introduction
Goal
Synchronize two environments S and T so that T is in the same state as S.
Use Case
There are multiple use cases for sychronizing environments, but a common one is to synchronize a test environment with the actual production environment, so that the former is in the exact same state as the latter and as such can be used as a realistic test environment for e.g. an upgrade of the CMS.
Strategy
The strategy to synchronize environment T with environment S is straighforward: the database in S is backed up, and the backup is subsequently restored in T.
Procedure
- Backup the database in the source environment (S). It is not needed to stop Hippo CMS instances running in S.
- Export from the target CMS Console (T) the following nodes and any other environment specific configuration that needs to be preserved:
/hippo:configuration/hippo:users
/hst:hst/hst:hosts
/targeting:targeting/targeting:datastores
/hippo:configuration/hippo:groups
/hippo:configuration/hippo:domains/everywhere/hippo:authrole - Stop the Hippo CMS instances in the target environment (T).
- Remove the Jackrabbit index from the target environment (T).
The default location of the index folder is ${catalina.base}/../repository/workspaces/default/index. - Import the previously backed up database from the source environment (S) into the target environment (T).
- Truncate the following tables in the target database:
REPOSITORY_LOCAL_REVISIONS
REPOSITORY_JOURNAL -
Start the CMS in the target environment (T) and wait for the repository to finish indexing.
-
In the target environment (T) use the Console to restore the nodes that were previously exported.