This topic describes what items need to be gathered to copy a complete XperienCentral installation from a source environment A to a target environment B.Generally speaking, the items listed below need to be gathered from environment A in order to create a working copy on the target environment B:
- Complete database backup(s)
- XperienCentral deploy
- Installed plugins
- The file
web/docs(copy the entire directory to the same location in the new environment)
The JCR Import Export Tool is also useful during the process of copying an XperienCentral installation.
In This Topic
Gathering the Source Material
The Complete Database Backup(s)
Backing up all databases is necessary to gather all the content that is present in an XperienCentral installation. The database administrator of environment A needs to create a complete database backup of the database(s) that XperienCentral uses. In a regular setup, XperienCentral uses only one database in which the JCR content is stored next to the content of the Content Repository. Therefore the database administrator will typically only have to back up one database. An overview of the databases being used can be obtained through the [Database Configuration] tab in the Setup Tool.
The XperienCentral Deploy
The XperienCentral on the source environment A runs in a deployment that was previously delivered by a developer to the system. To be sure that environment B is identical to environment A, use the deployment that the system administrator is using for environment A as long as the directory structure is the same, otherwise use a deployment of the same version as A but with the correct structure for B.
The configuration.xml File
If the target environment B has to be identical, it is necessary to use the same
configuration.xml as on the source environment A. It is important that the
configuration.xml file contains the hostnames of both environments. XperienCentral checks whether it is called by the hostnames as configured in the
configuration.xml. There will be an error if the hostnames of environment B are not also present in the
configuration.xml. New configuration files can be obtained from GX Software.
Setting up the Target Environment
In the example below, the source environment A is a Linux environment and the target environment B is a Windows environment.
Restore the Database
Restore the database backup(s) to a local environment. It is recommended that you restore the database within an environment which is the same as the source, that is, if the source is a Linux MySQL, then restore the database within a Linux MySQL environment in order to avoid any errors caused by platform differences. Also, make sure that the database you switch to uses the same character set and has the same case sensitivity rules.
Truncate database table
After restoring the database, the following tables need to be truncated in order to remove environment-specific information:
truncate table WM9_CL_LOCAL_REVISIONS
truncate table WM9_CL_JOURNAL
non Oracle (MSSQL/MySQL)
truncate table WM9_CLUSTER_JOURNAL
truncate table WM9_CLUSTER_LOCAL_REVISIONS
On all databases
truncate table wmLocalRevision
truncate table wmLocalFullIndexStatus
truncate table wmGlobalIndexEventQueue
truncate table ClusterLock
truncate table rtIndex_Items
truncate table rtIndex_Revision
(errors/warnings about tables not available can be ignored)
Installing/unpacking a Clean XperienCentral Release
In case the release is a ZIP: unzip the XperienCentral release into
Process the Deploy File
Unzip the WAR-files from the deployment ZIP-file to
C:\GX\XperienCentral-copy-of-A\deploy-wars\. Unzip the .WAR files - the following folders appear:
C:\GX\XperienCentral-copy-of-A\apache-tomcat\. Edit the
C:\GX\XperienCentral-copy-of-A\apache-tomcat\conf\server.xml to make sure it uses the .WAR files that were extracted in the previous step. The following is an example of a
<Server port="8005" shutdown="SHUTDOWN"> <GlobalNamingResources> <!-- Userdatabase is used to secure admin pages! Make sure the path is ok otherwise the admin jsps will not work --> <Resource name="WMUserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="XperienCentral user database" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="/vol/www/tomcat-mywebsite/deploy/admin-users.xml" /> </GlobalNamingResources> <Service name="WebManager"> <Connector port="8009" enableLookups="false" redirectPort="8443" debug="1" protocol="AJP/1.3" URIEncoding="UTF-8" secretRequired="false" connectionTimeout="600000"/> <Engine name="WebManager" defaultHost="localhost"> <Realm className="org.apache.catalina.realm.LockOutRealm" > <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="WMUserDatabase"/> </Realm> <Host name="localhost" unpackWARs="true" autoDeploy="false" deployOnStartup="false" appBase="/vol/www/tomcat-mywebsite/deploy"> <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> <Context path="/web" docBase="webmanager-backend-webapp-1.0-SNAPSHOT.war"> <Valve className="org.apache.catalina.authenticator.DigestAuthenticator" cache="true" /> </Context> </Host> </Engine> </Service> </Server>
Place the configuration.xml File
configuration.xml file in the folder
C:\GX\XperienCentral-copy-of-A\configuration\. A website will only run properly if the hostnames are present in the
configuration.xml. In this case the
configuration.xml is used on both environments. Therefore the
configuration.xml needs to contain the hostnames of source environment A and target environment B (in this example these hostnames are "127.0.0.1" and "localhost").
Check the springmvc-servlet.xml
Open the file
C:\GX\XperienCentral-copy-of-A\deploy-wars\webmanager-backend-webapp-1.0-SNAPSHOT\WEB-INF\springmvc-servlet.xml. Check and change the pathnames for the parameters
webrootDirectory. For example:
<property name="cacheDirectory"> <value>C:\GX\XperienCentral-copy-of-A\work\cache\services</value> </property> <property name="repositoryDirectory"> <value>C:\GX\XperienCentral-copy-of-A\work\jcr</value> </property> <property name="webrootDirectory"> <value>C:\GX\XperienCentral-copy-of-A\deploy-wars\webmanager-static-webapp-1.0-SNAPSHOT</value> </property>
Check the startup_config.xml
Open the file
C:\GX\XperienCentral-copy-of-A\deploy-wars\webmanager-backend-webapp-1.0-SNAPSHOT\WEB-INF\startup_config.xml. Check and change the pathnames for the parameters
config_filename. For example:
<entry name="base_directory" value="C:\GX\XperienCentral-copy-of-A\work" /> <entry name="config_filename" value="C:\GX\XperienCentral-copy-of-A\configuration\configuration.xml"/>
After performing these tasks, Tomcat can be started by running
The following are issues that might occur during the process as described in this document.
Tomcat error: “Configuration set name for servername "frontend_hostname-of-A" could not be found.”
If this error appears in the Tomcat log file, then the
frontend_hostname of the source environment A has to be added as
frontend_server_alias to environment B. This can be done manually using the Setup Tool.
ClassNotFoundError while creating export of the JCR
This might occur when trying to make an export of the JCR. This error is most likely caused by missing files in the
lib folder. In the root of XperienCentral there should be two items:
- The file
- A folder
libcontaining a number of files.