Multi-region cold standby disaster recovery: Backing up IBM Cloud Pak for AIOps
Use IBM Fusion to create a backup of your IBM Cloud Pak for AIOps deployment.
Backup procedure
Ensure that you meet the prerequisites in Before you begin.
Use the following instructions to install IBM Fusion on the same Red Hat OpenShift cluster as IBM Cloud Pak for AIOps, and then create a backup of IBM Cloud Pak for AIOps.
1. Ensure that you have a VolumeSnapshotClass
To enable IBM Fusion backups, you must have a VolumeSnapshotClass
defined for one of the storage classes that host IBM Cloud Pak for AIOps. For more information, see Prerequisites in the IBM Fusion documentation.
Run the following command to check whether a VolumeSnapshotClass
is defined already:
oc get volumesnapshotclass
If the preceding command does not return anything, then you do not have a VolumeSnapshotClass
defined. Refer to your storage provider's documentation to create one.
2. Install IBM Fusion
You must install IBM Fusion v2.8.x or v2.9.x.
Follow the Installing instructions for your Red Hat OpenShift deployment type in Deploying IBM Fusion in the IBM Fusion documentation. Accept the default values.
Note: As you are installing IBM Fusion on the same Red Hat OpenShift cluster as IBM Cloud Pak for AIOps, you already have an entitlement pull secret configured.
3. Deploy the IBM Fusion Backup & Restore service
-
Install the IBM Fusion Backup & Restore service.
Follow the instructions in Backup and restore hub in the IBM Fusion documentation.
The
ibm-backup-restore
project (namespace) is created, and the backup and restore service is installed in that project. -
Configure the backup storage location for IBM Fusion to store the IBM Cloud Pak for AIOps backups in.
The backup storage location must be external object storage, and can be any S3 compatible storage or Microsoft® Azure Blob Storage.
Follow the instructions in Adding a backup storage location in the IBM Fusion documentation.
-
Create a backup policy.
The backup policy specifies the backup location, frequency, and retention period of the backup. Specify the backup storage location that you created in the previous step as the backup location.
Follow the instructions in Creating backup policy in the IBM Fusion documentation.
-
Select the IBM Cloud Pak for AIOps application that you want to backup, and assign the backup policy to it.
Follow the instructions in Selecting applications for protection in the IBM Fusion documentation.
Important: Before you select Assign in the user interface, you must deselect Run backup now to prevent the backup from running immediately.
-
Find the name of your policy assignment.
Your policy assignment name is the IBM Cloud Pak for AIOps installation namespace concatenated with the backup policy name. Run the following command to find it, and then make a note of it:
oc get fpa -n ibm-spectrum-fusion-ns
4. Configure the IBM Fusion Backup & Restore service for IBM Cloud Pak for AIOps
-
Run the following commands to set the environment variables that you need.
export PROJECT_CP4AIOPS=<namespace> export CUSTOM_PROFILE=<custom_profile> export POLICY_ASSIGNMENT_NAME=<policy_assignment_name>
Where:
<namespace>
is the namespace (project) that your IBM Cloud Pak for AIOps installation is deployed in, for examplecp4aiops
.<custom_profile>
is blank unless IBM Sales representatives and Business Partners used the custom sizing tool to supply you with a custom profile ConfigMap to customize your deployment. If you were supplied with a custom profile ConfigMap, then this is the name of your custom profile ConfigMap, usuallyaiops-custom-size-profile
.<policy_assignment_name>
is the policy assignment name that you found in the previous step.
-
Find your installation name and set an environment variable for it.
-
Find the name of your IBM Cloud Pak for AIOps installation.
oc get installation -n ${PROJECT_CP4AIOPS}
Example output, where
ibm-cp-aiops
is the name of the IBM Cloud Pak for AIOps installation:NAME PHASE LICENSE STORAGECLASS STORAGECLASSLARGEBLOCK AGE ibm-cp-aiops Running Accepted rook-cephfs rook-ceph-rbd 34h
-
Export an environment variable with the name of your installation.
export INSTALLATION_NAME=<name>
Where
<name>
is the name returned by the previous command, for exampleibm-cp-aiops
.
-
-
Run the following commands to add labels to IBM Cloud Pak for AIOps resources so that they are correctly identified.
oc -n $PROJECT_CP4AIOPS label secret ${INSTALLATION_NAME}-edb-secret manual=${INSTALLATION_NAME}-edb-secret oc -n $PROJECT_CP4AIOPS label secret ${INSTALLATION_NAME}-redis-secret manual=${INSTALLATION_NAME}-redis-secret oc -n $PROJECT_CP4AIOPS label secret ibm-zen-secret-jwks manual=ibm-zen-secret-jwks oc -n $PROJECT_CP4AIOPS label secret ibm-zen-secret-jwt manual=ibm-zen-secret-jwt oc -n $PROJECT_CP4AIOPS label secret ibm-zen-secret-jwt-private manual=ibm-zen-secret-jwt-private oc -n $PROJECT_CP4AIOPS label secret aiopsedge-config-encryption-history manual=aiopsedge-config-encryption-history oc -n $PROJECT_CP4AIOPS label secret platform-auth-ldaps-ca-cert manual=platform-auth-ldaps-ca-cert oc -n $PROJECT_CP4AIOPS label secret ibm-entitlement-key manual=ibm-entitlement-key-secret oc -n $PROJECT_CP4AIOPS label subscriptions.operators.coreos.com ibm-aiops-orchestrator manual=ibm-aiops-orchestrator
-
Download the IBM Cloud Pak for AIOps backup and restore IBM Fusion recipe.
The IBM Fusion recipe defines the sequence of actions and checks that IBM Fusion must use for the backup and restore of IBM Cloud Pak for AIOps resources and PVCs.
Download the recipe
aiops-backup-restore.yaml
, from github.com/IBM. -
Adjust the recipe if you have a non-default installation name.
If your installation name is not
ibm-cp-aiops
, then edit the recipe that you downloaded, and alter all occurences ofibm-cp-aiops
to be your installation name. -
Adjust the recipe for custom sizing.
IBM Sales representatives and Business Partners may have used a custom sizing tool to supply you with a custom profile to customize your IBM Cloud Pak for AIOps deployment at installation time.
If IBM Sales representatives and Business Partners did not supply you with a custom profile, then skip this step.
If IBM Sales representatives and Business Partners supplied you with a custom profile, then add a label to the custom profile ConfigMap in your IBM Cloud Pak for AIOps deployment. Run the following command:
oc label cm ${CUSTOM_PROFILE} cm=aiops-custom-size-profile
-
Create the IBM Cloud Pak for AIOps recipe custom resource.
Run the following command to create the recipe custom resource.
oc apply -f aiops-backup-restore.yaml
-
Configure your policy assignment to use the IBM Cloud Pak for AIOps back and restore recipe.
Patch the policy assignment with the details of the IBM Cloud Pak for AIOps back and restore recipe.
oc -n ibm-spectrum-fusion-ns patch policyassignment ${POLICY_ASSIGNMENT_NAME} --type merge -p '{"spec":{"recipe":{"name":"aiops-backup-restore-recipe", "namespace":"ibm-spectrum-fusion-ns"}}}'
What to do next
Backups occur according to the schedule that you set in your policy. If you want to run a backup immediately, follow the instructions in Backup now .
You can monitor the progress of the backup from Backup & restore > Jobs in the IBM Fusion user interface.
To view the IBM Fusion logs, or to see the resources that were backed up, see Troubleshooting multi-region cold standby disaster recovery for IBM Cloud Pak for AIOps.