Backing up and restoring Lifecycle Query Engine relational store for Db2 database

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 Db2 database host machine.
    2. In the command line, run the following command to create the directory for placing the exported files:
      • On Windows:
        MKDIR c:\export
      • On Linux:
        mkdir /usr/export
        Note: The directories that are used in the preceding commands are examples only. You can specify any directory of your choice.
    3. Connect to the database from which you want to take the backup:
      connect to database_name user userid using password

      Where database_name is the name you assigned to the Db2 database that contains your data warehouse. User ID and password are the Db2 user ID and password that is required to access that database.

    4. In command line, go to the directory created at step 5(b), where the export command creates exported files.
    5. Export the data by running the following command:
      db2move database_name export -sn RITRS

      Where the database_name is the name, you assigned to the Db2 database that contains your data warehouse.

  6. Import the memory dump data.
    1. If you are restoring the backup to the same DB, then you can directly run the following command:
        • Connect to the Db2 Database to where you want to restore the data.
        • Run the following command to Disable foreign key constraint so exported data can be restored.
          Db2 call DISABLEFKCONSTRAINT()
        • Wait for the message result =0 and then run the following command to restore the data.
          db2move database_name import -l file_path

          Where the file_path is the path of directory where the data is exported during backup.

        • When the restore is successful, run the following command to enable the foreign key constraint back.
          Db2 call ENABLEFKCONSTRAINT()
        • Wait for result = 0 message that confirms that execution is completed.
    2. If you want to restore the backup to a different DB instance, run through the JTS setup, which creates the data warehouse schemas. Also load some predefined rows into it.
        • Connect to the new Db2 database to the location where you need to restore the data.
        • Run the following command to disable the foreign key constraint so that exported data is restored.
          Db2 call DISABLEFKCONSTRAINT()
        • Wait for the message result =0 and then run the following command, which restores the data.
          db2move database_name import -l file_path

          Where the file_path is the path of directory where the data is exported during backup.

        • When the restore is successful, run the following command to enable the foreign key constraint back.
          Db2 call ENABLEFKCONSTRAINT()
        • Wait for result = 0 message that confirms that execution is completed.
  7. Copy the data set and metadata folder from LQE backup and place 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 the data is restored to a 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. 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.