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

  1. Log in to the LQE as Admin.
  2. Pause all indexing on TDB and RS in LQE. For more information, see Backing up and restoring Lifecycle Query Engine and Link Index Provider.
  3. Start backup from LQE Admin for TDB and application metadata.
  4. When the backup is completed, shut down the LQE server.
  5. To take the backup of LQE RS, use the export dump file of RITRS schema as instructed in the following steps:
    1. 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".
    2. 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.
    3. 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.

    4. 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 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;
    5. 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.log
      Where:
      • XEPDB1 is the DB name (Identifier) used to connect to your LQE RS DB.
      • The schema.dmp file and the expschema.log file are written to the dmpdir directory.
  6. Import the dump data.
    1. 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.

    2. 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".
    3. 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.
    4. Start the SQL Command Line (SQL*Plus) and connect as user SYSTEM by entering the following at the command prompt:
      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 and DBIdentifier is the Identifier of Oracle DB you have used for LQE RS.
    5. 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;
    6. Copy the schema.dmp file that is created at the time of export to the /usr/lib/oracle/xe/tmp location.
    7. In the command prompt, run the following command:
      impdp SYSTEM/oracle@XEPDB1 SCHEMAS=RITRS DIRECTORY=dmpdir DUMPFILE=schema.dmp TABLE_EXISTS_ACTION=replace LOGFILE=impschema.log
      Here, XEPDB1 is the DB name (Identifier) used to connect to your LQE RS DB.
  7. Copy the data set and metadata folder from LQE backup and put it in the /lqe/conf folder.
  8. Rename the existing TDB folder.
  9. Edit the lqe.properties file and set lqe.restore=true.
  10. 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.
  11. Start the server.
  12. When the server starts, it restores LQE TDB index file and LQE metadata.
  13. Load the LQE admin UI and on the Data Providers page, resume indexing of all data providers for TDB and RS.
  14. All data providers must be up-to date for TDB and RS.