Cloning the LQE1 instance to create another instance named LQE2
Generate a cloned instance named LQE2 from a backup of the original Lifecycle Query Engine instance (LQE1). To configure Lifecycle Query Engine backup schedule, see Backing up and restoring Lifecycle Query Engine Relational store for Oracle or Backing up and restoring Lifecycle Query Engine relational store for Db2 database.
Note: Context root of LQE2 must be the same as LQE 1.
A backup contains all the type system model in Lifecycle Query Engine and a copy of the indexed data.
Procedure
- Pause or disable all the metrics collection jobs on LQE1. Ensure that you do not resume metrics collection.
- Run an Lifecycle Query Engine backup on the original LQE instance (LQE1).
- Install Lifecycle Query Engine in a new servlet engine. You do not need to configure a new Jazz® Team Server or application server.
- Create a relational database for the new Lifecycle Query Engine instance (LQE2).
- Create new data warehouse for LQE rs to store Indexed data.
-
Import the dump data.
-
If you are restoring the backup to the same DB, then you can directly run the following
command:
impdp SYSTEM/oracle@XEPDB1 SCHEMAS=RITRS DIRECTORY=dmpdir DUMPFILE=schema.dmp TABLE_EXISTS_ACTION=replace LOGFILE=impschema.log
Where XEPDB1 is the DB name (Identifier) used to connect to your LQE rs DB.
-
If you want to restore the backup to a different or new DB instance, run through the JTS setup,
which creates the DW schemas and also load some predefined rows into it. Do one of the
following:
- On Windows: Log in to the Oracle Database XE host computer as the user who installed Oracle Database XE, and then open a command window.
- On Linux®: Start a terminal session and log in to the Oracle Database XE host computer with the Oracle user account.Note: Ensure that the environment variables are set according to the instructions in "Setting Environment Variables on the Linux Platform".
-
At the command prompt, issue the command appropriate to your operating system to create the
directory where the exported files will be placed:
- On Windows:
MKDIR c:\oraclexe\app\tmp - On Linux:
mkdir /usr/lib/oracle/xe/tmpNote: The directories that are used in the preceding commands are examples only. You can specify any directory of your choice.
- On Windows:
-
Start the SQL Command Line (SQL*Plus) and connect as user SYSTEM by entering the following at
the command prompt:
Where password is the password that you specified for the SYS and SYSTEM user accounts upon installation (Windows) or configuration (Linux) of Oracle database XE and DBIdentifier is the Identifier of Oracle DB you have used for LQE rs.sqlplus SYSTEM/password@DBIdentifier -
At the SQL command prompt, enter the following commands to create a directory object that is
named dmpdir for the tmpdirectory that you created,
and to grant read and write access to it for user RITRS.
- On Windows:
CREATE OR REPLACE DIRECTORY dmpdir AS 'c:\oraclexe\app\tmp'; GRANT READ, WRITE ON DIRECTORY dmpdir TO RITRS; - On Linux:
CREATE OR REPLACE DIRECTORY dmpdir AS '/usr/lib/oracle/xe/tmp'; GRANT READ, WRITE ON DIRECTORY dmpdir TO RITRS;
- On Windows:
- Copy the schema.dmp file that is created at the time of export to the /usr/lib/oracle/xe/tmp location.
-
In the command prompt, run the following command:
Here, XEPDB1 is the DB name (Identifier) used to connect to your LQE rs DB.impdp SYSTEM/oracle@XEPDB1 SCHEMAS=RITRS DIRECTORY=dmpdir DUMPFILE=schema.dmp TABLE_EXISTS_ACTION=replace LOGFILE=impschema.log
-
If you are restoring the backup to the same DB, then you can directly run the following
command:
-
Before you start the LQE2 instance for the first time,
complete the following steps:
-
Copy the following folders from the LQE1 instance to the
LQE2 instance:
- Copy /datasets into conf/lqe
- Copy /metadata into conf/lqe
- Copy the lqe.key and lqe.node.id files from the LQE1 instance into the conf/lqe folder in the LQE2 instance.
- In the /server/conf/lqe/lqe.properties file of the LQE2 instance, set this Lifecycle Query Engine property: lqe.restore=true
- Optional: Specify a name for the new installation, such as LQE2. In the lqe.node.id file in the new installation, edit the lqe.node.name property to specify the new name. Do not change the lqe.node.id property.
-
Copy the following folders from the LQE1 instance to the
LQE2 instance:
-
Start the LQE2 instance and configure the database
connection.
It might take a while for the LQE2 instance to start.
- Go to the JTS set up page at https://[fully qualified hostname]:9443/jts/setup
- Select Custom set up and advance through the pages until you reach the Register Applications page. Do not change any of the existing values.
-
On the Register Applications page, register the new LQE
installation.
- Click Add Application.
- In the Discovery URL field, enter the https://[fully qualified hostname]:[port]/lqe/scr value using the hostname and port of the new Lifecycle Query Engine installation.
- In the Application Instance field, enter a name that is different from any of the existing Lifecycle Query Engine installations. The name does not need to match the context root of the installation.
- Finish JTS setup. Do not change any of the existing values.
- Go to https://host:port/lqe. A configuration page is shown. Enter the database connection information for a new, empty Lifecycle Query Engine database. Do not use the same database as the LQE1 instance.
- Save your changes.
The Lifecycle Query Engine home page is shown, which lists the data providers for the LQE2 instance. - Pause or disable all the metrics collection jobs on LQE2.
- Validate the LQE2 instance. Go to the Lifecycle Query Engine page for the LQE2 instance and verify that the same data providers are configured for both instances. Verify that the data providers update successfully.
- Go to LQE2 Administration > Relational store Setting, add newly created data warehouse connection details and save.
- Validate LQE relational store indexing is enabled and all data providers are up to date.
Results
You now have two Lifecycle Query Engine instances that contain the same-indexed data and historical trend data. You can now reindex the LQE2 instance.