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
- 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 Db2 database host machine.
-
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.
- On Windows:
-
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
andpassword
are the Db2 user ID and password that is required to access that database. - In command line, go to the directory created at step 5(b), where the export command creates exported files.
-
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.
-
Import the memory dump data.
-
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.
-
-
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.
-
-
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 place it in the /lqe/conf folder.
- Rename the existing TDB folder.
- Edit the lqe.properties file and set lqe.restore=true.
- 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.
- Start the server.
- When the server starts, it restores LQE TDB index file and LQE metadata.
- Load the LQE admin UI. 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.