Backing up IBM OpenPages for IBM Cloud Pak for Data

You can back up your IBM OpenPages® for IBM Cloud Pak for Data instance.

This topic describes backing up instances of IBM OpenPages for IBM Cloud Pak for Data for Refresh 1 of Cloud Pak for Data Version 4.0 and earlier versions.

For Refresh 2 of Cloud Pak for Data Version 4.0, released in October 2021, see Backing up and restoring an entire deployment with the Cloud Pak for Data OADP backup and restore service and, if you encounter issues while backing up or restoring, see Troubleshooting OpenPages backup and restore.

Before you begin

If you have custom JSPs or other custom files, you need to do some additional steps before you run a backup. For more information, see Backing up custom files in IBM OpenPages for IBM Cloud Pak for Data.

If you use custom keystores, ensure that the keystore files are stored in /opt/ibm/wlp/output/defaultServer/resources/security. Or, add the keystore files to the /opt/ibm/OpenPages/aurora/bin/op-backup.manifest file.

About this task

When you back up IBM OpenPages for IBM Cloud Pak for Data, you need to back up both the database and the application files. The application files include the openpages-storage directory, which contains file attachments, and the application configuration.

You can do an online backup or an offline backup.

For information about backing up external databases for IBM OpenPages for IBM Cloud Pak for Data, see Backing up, restoring, and migrating OpenPages.

Performing an online backup

Do an online backup when you want to back up IBM OpenPages for IBM Cloud Pak for Data without restarting the servers.

Procedure

  1. Log in to your Red Hat® OpenShift® cluster as a project administrator:
    oc login OpenShift_URL:port
  2. Change to the project where OpenPages is installed:
    oc project <Project>
  3. Log in to the database server pod.
    Do one of the following steps:
    • Run the following command:
      oc exec -it c-db2oltp-<*>-db2u-0 -- /bin/bash

      To find the name of the pod, run oc get sts and look for a name with the pattern c-db2oltp-*-db2u-0.

      For example, c-db2oltp-1601355983782494-db2u-0

    • Or, in the Red Hat OpenShift console, go to the Db2® server pod and open a terminal.
  4. Switch to the db2inst1 user by running the following command:
    su - db2inst1
  5. Verify that the database parameter LOGARCHMETH1 is configured
    Run the following command:
    db2 get db cfg for OPX | grep LOGARCHMETH1
    Look for a result that is similar to the following text:
    First log archive method
      (LOGARCHMETH1) = DISK:/mnt/bludata0/db2/archive_log/
  6. Back up the database by running the following command:
    db2 backup db OPX on all dbpartitionnums online to /mnt/backup include logs without prompting
    An encrypted backup is created in the /mnt/backup directory, which is a persistent storage volume.
  7. Log in to any of the application server pods.
    Use one of the following methods:
    Using the web client
    In the Red Hat OpenShift console, go to an application server pod and open a terminal.
    Using the command line
    1. Log in to your Red Hat OpenShift cluster as a project administrator:
      oc login OpenShift_URL:port
    2. Change to the project where the IBM® Cloud Pak for Data control plane is installed:
      oc project <Project>
    3. Log in to the application server pod and open a terminal:
      oc exec -it openpages-<instance_name>-sts-<N> -- /bin/bash

      To find the pod name, run oc get sts and look for a name that starts with openpages-.

  8. Back up OpenPages by running the following command:
    cd /opt/ibm/OpenPages/aurora/bin
    ./OPBackup.sh nosrvrst

    The backup is created in the /opt/ibm/OpenPages/openpages-backup-restore directory, which is a persistent storage volume. The runtime data in the backup is encrypted. The backup also contains configuration customizations.

Performing an offline backup

Procedure

  1. Log in to your Red Hat OpenShift cluster as a project administrator:
    oc login OpenShift_URL:port
  2. Change to the project where OpenPages is installed:
    oc project <Project>
  3. Scale down to 0 replicas.
    oc scale --replicas=0 sts/openpages-<instance_name>-sts

    To find the name of the StatefulSet (sts), run oc get sts and look for a name that starts with openpages-. For example, openpages-instance_name-sts

  4. If you are using an external database, back up the database by using the steps in Db2 database backup and restore for OpenPages, and then continue with step 8.
  5. Log in to the database server pod.
    Do one of the following steps:
    • Run the following command:
      oc exec -it c-db2oltp-<*>-db2u-0 -- /bin/bash

      To find the name of the pod, run oc get sts and look for a name with the pattern c-db2oltp-*-db2u-0.

      For example, c-db2oltp-1601355983782494-db2u-0

    • Or, in the Red Hat OpenShift console, go to the Db2 server pod and open a terminal.
  6. Switch to the db2inst1 user by running the following command:
    su - db2inst1
  7. Back up the database.
    Do the steps in the following task, starting at step 4 (offline backup): Backing up a Db2 database.
    • Replace the database name BLUDB with OPX.
    • Replace backup_dir with /mnt/backup
    An encrypted backup is created in the /mnt/backup directory, which is a persistent storage volume.
  8. Log in to your Red Hat OpenShift cluster as a project administrator:
    oc login OpenShift_URL:port
  9. Change to the project where OpenPages is installed:
    oc project <Project>
  10. Scale to 1 replica.
    oc scale --replicas=1 sts/openpages-<instance_name>-sts

    To find the name of the StatefulSet (sts), run oc get sts and look for a name that starts with openpages-. For example, openpages-opinst-sts

  11. When the application server pod is ready, log in to the pod.
    Use one of the following methods:
    Using the web client
    In the Red Hat OpenShift console, go to an application server pod and open a terminal.
    Using the command line
    1. Log in to your Red Hat OpenShift cluster as a project administrator:
      oc login OpenShift_URL:port
    2. Change to the project where the IBM Cloud Pak for Data control plane is installed:
      oc project <Project>
    3. Log in to the application server pod and open a terminal:
      oc exec -it openpages-<instance_name>-sts-0 -- /bin/bash

      To find the pod name, run oc get sts and look for a name that starts with openpages-.

  12. Back up OpenPages by running the following command:
    cd /opt/ibm/OpenPages/aurora/bin
    ./OPBackup.sh

    The backup is created in the /opt/ibm/OpenPages/openpages-backup-restore directory, which is a persistent storage volume. The runtime data in the backup is encrypted. The backup also contains configuration customizations.

  13. Log in to your Red Hat OpenShift cluster as a project administrator:
    oc login OpenShift_URL:port
  14. Change to the project where OpenPages is installed:
    oc project <Project>
  15. Scale up to the number of replicas you want to use for the application server by running the following command:
    oc scale --replicas=<#_of_replicas> sts/openpages-<instance_name>-sts

    Replace the following values:

    Variable Replace with
    <#_of_replicas> Specify the number of replicas.

    Can be 1 or more.

    <statefulset_name> Specify the name of the StatefulSet for the application.

    To find the name of the StatefulSet, run oc get sts and look for a name that starts with openpages-.

    For example, openpages-opinst-sts