Backing up and restoring Lifecycle Query Engine Relational store for Oracle
You can backup and restore LQE Triple store (TDB) and Relational store (RS) along with application metadata.
Procedure
- Log in to the LQE as Admin.
- Pause all indexing on TDB and RS in LQE. For more information, see Backing up and restoring Lifecycle Query Engine and Link Index Provider.
- Start backup from LQE Admin for TDB and application metadata.
- When the backup is completed, shut down the LQE server.
-
To take the backup of LQE RS, use the export dump file of RITRS schema as instructed in the
following steps:
-
Log in to the Oracle database.
- On Windows: Log in to the Oracle Database XE host computer as the user who installed Oracle Database XE, and then open a command prompt.
- 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".
-
In the command prompt, run the following command to create the directory for placing the
exported files:
- On Windows:
MKDIR c:\oraclexe\app\tmp
- On Linux:
mkdir /usr/lib/oracle/xe/tmp
Note: 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
using the following command:
sqlplus SYSTEM/password@DBIdentifier
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.DBIdentifier
is the Identifier of Oracle DB that you have used for LQE RS. -
At the SQL prompt, enter the following commands to create a directory object that is named
dmpdir
for the tmp directory that you created, and to grant read and write access to it for userRITRS
.- 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:
-
Export the RITRS schema to a dump file named schema.dmp by running the
following command:
expdp system/oracle@XEPDB1 SCHEMAS=RITRS DIRECTORY=dmpdir DUMPFILE=schema.dmp LOGFILE=expschema.logWhere:
- XEPDB1 is the DB name (Identifier) used to connect to your Lifecycle Query Engine relational store database.
- The schema.dmp file and the expschema.log file are written to the dmpdir directory.
-
Log in to the Oracle database.
-
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/tmp
Note: 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:
- Copy the data set and metadata folder from LQE backup and put it in the /lqe/conf folder.
- Rename the existing TDB folder.
- Edit the lqe.properties file and set lqe.restore=true.
- If you have restored the data to new DB instance, then edit the LQE RS connection details in dbconnection.properties file, dw.db.location and dw.db.password property.
- Start the server.
- When the server starts, it restores LQE TDB index file and LQE metadata.
- Load the LQE admin UI and on the Data Providers page, resume indexing of all data providers for TDB and RS.
- All data providers must be up-to date for TDB and RS.