Create and schedule online backups of a Cloud Pak for Data deployment with IBM Storage Fusion.
About this task
To create online backups, your
Cloud Pak for Data deployment must meet the following requirements:
- The minimum deployment profile of IBM Cloud Pak foundational services is
Small.For more information about sizing IBM Cloud Pak foundational services, see Hardware requirements and recommendations for foundational
services.
- All services are installed at the same Cloud Pak for Data release.
You cannot back up and restore a
deployment that is running service versions from different Cloud Pak for Data releases.
- The Cloud Pak for Data control
plane is installed in a
single project (namespace).
- The Cloud Pak for Data instance is installed in zero
or more tethered projects.
- Cloud Pak for Data operators and the Cloud Pak for Data instance are in a good state. For more
information, see Best practices for monitoring Cloud Pak for Data.
If
service-related custom resources are manually placed into maintenance mode prior to creating an
online backup, those custom resources will remain in the same state if the backup is restored.
Taking these services out of maintenance mode must be done manually after the restore.
You must be a cluster administrator or a similar role to create
backups.
Procedure
Creating IBM Storage Fusion
backup and restore resources on the hub
-
Create a backup object storage location for the backups.
- In IBM Storage Fusion, go to
and click Add
location.
- Add details for the location and click Add.
- Create a backup policy for the Cloud Pak for Data applications, and tie them to the backup
storage location.
- Go to and click Add
policy.
- Add details for the policy.
- Under Frequency, schedule when to run the backup
policy.
- Click Create policy.
- If you are creating one policy per application, repeat these steps for each project
(namespace) with a backup and restore recipe.
Recommendation: Create a single backup policy for all Cloud Pak for Data applications.
- Create backup policy assignments.
Note: If your Cloud Pak for Data deployment has tethered
projects (namespaces), do not create a backup policy or assign a backup policy to those projects.
The tethered projects are handled with the primary IBM Cloud Pak for Data control plane project.
- Go to and click Protect
apps.
- From the cluster menu, select the source cluster.
- In the Protect applications window, find and select the Cloud Pak for Data instance (tenant):
${PROJECT_CPD_INST_OPERATORS} application from the list and click
Next.
- Select a policy to assign to the application, and then set Back up
now toggle button to off.
Notes:
Do not assign a policy to the ${PROJECT_CPD_INST_OPERANDS}
application. This application is backed up with the recipe, described in the following step, that is
used to back up the ${PROJECT_CPD_INST_OPERATORS} application.
Backup and restore recipe details are not yet associated with the policy assignment, so any
backups that are taken now will be invalid.
- If the Cloud Pak for Data
scheduling service is installed, repeat these
steps to assign the
${PROJECT_SCHEDULING_SERVICE} policy to
the scheduling service.
- Patch policy assignments with the backup and restore recipe details.
- Log in to Red Hat®
OpenShift® Container Platform as an instance
administrator.
${OC_LOGIN}
Remember:
OC_LOGIN is an alias for the oc login
command.
- Get each policy assignment name:
export PROJECT_FUSION=<fusion-namespace>
oc get policyassignment -n ${PROJECT_FUSION}
- If installed, patch the
${PROJECT_SCHEDULING_SERVICE} policy assignment:
oc -n ${PROJECT_FUSION} patch policyassignment <cpd-scheduler-policy-assignment> --type merge -p '{"spec":{"recipe":{"name":"ibmcpd-scheduler", "namespace":"'${PROJECT_SCHEDULING_SERVICE}'", "apiVersion":"spp-data-protection.isf.ibm.com/v1alpha1"}}}'
- Patch the Cloud Pak for Data tenant policy
assignment:
oc -n ${PROJECT_FUSION} patch policyassignment <cpd-tenant-policy-assignment> --type merge -p '{"spec":{"recipe":{"name":"ibmcpd-tenant", "namespace":"'${PROJECT_CPD_INST_OPERATORS}'", "apiVersion":"spp-data-protection.isf.ibm.com/v1alpha1"}}}'
- Verify that
policy assignments are associated to the correct Cloud Pak for Data backup and restore recipes by running the
command again:
oc get policyassignments.data-protection.isf.ibm.com -n ${PROJECT_FUSION}
Check that the command returns output such as in the following example.
NAME PROVIDER APPLICATION BACKUPPOLICY RECIPE RECIPENAMESPACE PHASE LASTBACKUPTIMESTAMP CAPACITY
cpd-operator-cpd-operator-apps isf-backup-restore cpd-operator cpd-operator ibmcpd-tenant cpd-operator Assigned 20h 59460607
cpd-scheduler-cpd-scheduler-apps isf-backup-restore cpd-scheduler cpd-scheduler ibmcpd-scheduler cpd-scheduler Assigned 20h 88206
- If the recipes are not associated to the correct policy assignments, do the following
substeps.
- Unassign the policies from the applications.
- Verify that the cpdbr
service is installed in the Cloud Pak for Data
operator project and in the Cloud Pak for Data control
plane
project.
- Verify that the recipe recipes.spp-data-protection.isf.ibm.com
was installed in both projects.
- Reassign the policies to the respective applications.
- Repeat step 6.
Backing up Cloud Pak for Data
applications
- Go to .
- Select the
${PROJECT_CPD_INST_OPERATORS} application and click
Back up now.
When the ${PROJECT_CPD_INST_OPERATORS} application is backed up, the
${PROJECT_CPD_INST_OPERANDS} project is backed up with it.
- If installed, repeat the previous step to back up the
${PROJECT_SCHEDULING_SERVICE} application.
Monitoring backup jobs
- To monitor backup jobs, go to and click the
Backups
tab.
- Select a job to view the inventory of what resources will be backed up and the progress
of the backup flow.
What to do next
If a backup fails,
you must return
Cloud Pak for Data to a good state before
you can retry a backup. Do the following steps:
- Get the Cloud Pak for Data instance (tenant)
pod:
CPD_TENANT_POD=`oc get po -n ${PROJECT_CPD_INST_OPERATORS} -l component=cpdbr-tenant,icpdsupport/addOnId=cpdbr,icpdsupport/app=br-service | grep cpdbr-tenant-service | awk '{print $1}'`
echo "cpd tenant pod: $CPD_TENANT_POD"
- Run backup
post-hooks:
oc exec -it -n ${PROJECT_CPD_INST_OPERATORS} $CPD_TENANT_POD -- /cpdbr-scripts/cpdbr/checkpoint_backup_posthooks.sh --tenant-operator-namespace=${PROJECT_CPD_INST_OPERATORS}
If you have services that connect to
an external database, such as for business intelligence (BI) reporting, it is recommended that you
also back up the database. Backing up the external database ensures data consistency if the Cloud Pak for Data backup is later restored. For example, you need
to restore an older Cloud Pak for Data backup instead of
the most recent backup. The external database is synchronized with the most recent Cloud Pak for Data backup, so it has data that is not in the
backup that you want to restore. To maintain data consistency, you need to restore the external
database backup that was taken at the same time as the Cloud Pak for Data backup.