Restoring data
Use IBM Spectrum® Discover Red Hat® OpenShift® Container Platform (OCP) single environment to restore the data.
Procedure
-
Establish a connection to IBM Spectrum
Discover
Red Hat OpenShift instance where the data is to be
restored by a terminal or through
ssh
, considering the need of a consistent and permanent connection during the migration process as explained in the prerequisites section. - Create conf file and save (data_migration.conf
for instance) or make sure that the following environment variables are set:
DM_ACTION=<BACKUP|RESTORE> DM_DATA_PATH=<Absolute path as working directory where the data will be stored (ensure having enough storage)> DM_TAR_NAME=<Tarball name which will be used to locate backup or restore tarball data
The following example demonstrates how to use configuration file content:
DM_ACTION=RESTORE DM_DATA_PATH=/mnt/bludata0/ DM_TAR_NAME=databackup-2022
The following example demonstrates how to export the environment variables:$ export DM_ACTION=BACKUP $ export DM_DATA_PATH=/mnt/bludata0/ $ export DM_TAR_NAME=databackup-2022
As mentioned, the configuration file must contain the preceding variables and their values, or you can export those values as environment variables on the same instance where the script resides. - Issue the following commands to start data restore:
- In case you set the variables on the environment, do the following steps:
-
curl -s -O https://raw.githubusercontent.com/IBM/ibm-spectrum-discover-resources/2.0.5.2/data_migration.sh
- In case you set a configuration file with necessary variables (data_migration.conf for instance), do the following steps:
-
curl -s -O https://raw.githubusercontent.com/IBM/ibm-spectrum-discover-resources/2.0.5.2/data_migration.sh chmod +x data_migration.sh ./data_migration.sh data_migration.conf
After the preceding command is issued, you get a message as shown here:Database restored. Data migration complete!
Note: Depending on your computer power and number of records, this task might take hours to complete. - After the restoration process is complete, your data is available on the new Red Hat OpenShift IBM Spectrum Discover instance and you can continue using your environment.