Backing up data

Use Data Cataloging Open Virtual Appliance (OVA) single instance environment to back up the database.

Procedure

  1. Establish a connection to Data Cataloging OVA backup target instance. The data is backed up 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.
  2. Create conf file and save it (data_migration.conf for instance) or make sure that the following environment variables are exported in the current environment:
    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=BACKUP
    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.
  3. Issue the following commands as per the needed scenario to start the data backup:
    In case you set up 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 up 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 command is issued, you get a message and also a tarball with the backed-up data as shown here:
    DONE: Data backed up on tarball -> databackup-2022.tar.gz on current directory /home/moadmin
    Note: Depending on your computer power and number of records, this task might take hours to complete.
  4. After the data backup is complete, transfer the tarball to the Data Cataloging Red Hat® OpenShift® instance by using scp or any other method, specifically to the bastion node to be prepared for restoring the data.