About this task
Use these steps to restore the instance that you backed up. If you want to restore the backup
into a different instance, see Migrating IBM OpenPages for IBM Cloud Pak for Data to another instance.
Procedure
- Log in to your Red Hat®
OpenShift®
cluster as a project administrator:
oc login OpenShift_URL:port
- Change to the project where OpenPages is installed:
- 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
- If you are using an external database, restore the database by using the steps in Db2 database backup and restore for OpenPages, and then continue with step 7.
- 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.
- Restore the database.
Do the steps in the following task:
Restoring a
Db2 database.
- Replace the database name
BLUDB
with OPX
.
- Replace
backup_dir
with
/mnt/backup
- Log in to your Red Hat
OpenShift
cluster as a project administrator:
oc login OpenShift_URL:port
- Change to the project where OpenPages is installed:
- 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
- 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-
.
- Go to the /opt/ibm/OpenPages/openpages-backup-restore
directory.
- Locate the backup file that has the most recent timestamp. Use this file in step 13.
- Restore the backup by running the following commands:
cd /opt/ibm/OpenPages/aurora/bin
./OPRestore.sh <backup_filename_without_the_file_extension>
For
example:
cd /opt/ibm/OpenPages/aurora/bin
./OPRestore.sh op_backup_2020_11_20_21_43_04
- Restart the application server by running the following command:
- Go to the /opt/ibm/OpenPages/openpages-backup-restore directory.
Move all backup files, except the file you used in step 13, to a subfolder under
/opt/ibm/OpenPages/openpages-backup-restore.
- Log in to your Red Hat
OpenShift
cluster as a project administrator:
oc login OpenShift_URL:port
- Change to the project where OpenPages is installed:
- 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
|