Creating and scheduling online backups of Cloud Pak for Data with IBM Storage Fusion

Create and schedule online backups of a Cloud Pak for Data deployment with IBM Storage Fusion.

Before you begin

Ensure that all backup prerequisite tasks are done.

If your Cloud Pak for Data deployment was upgraded from version 4.5.x or 4.6.x to 4.8.0 or later, and you used the IBM Storage Fusion 2.5.2 Backup & Restore (Legacy) service to create and schedule backups, stop the backup schedules and unassign the backup policies in the Backup & Restore (Legacy) service in IBM Storage Fusion Version 2.6.1 or later fixes. These backups are not supported by the Backup & Restore service in IBM Storage Fusion 2.6.x or later.

Remove backup schedules for the following applications:
  • Cloud Pak for Data operators
  • Cloud Pak for Data instances
  • IBM Storage Fusion project
  • IBM Spectrum® Protect Plus catalog

After you have removed the backup schedules, uninstall the Backup & Restore (Legacy) service.

Do the following steps:

  1. In IBM Storage Fusion, click Applications and go to the Cloud Pak for Data operators application.
  2. In the Backups tab, under Backup policy, remove the policy by clicking Actions icon and then clicking Remove.
  3. Repeat the previous step to unassign the policies for the Cloud Pak for Data instance and IBM Storage Fusion project applications.
  4. Validate that these policies were removed by running the following commands:
    export PROJECT_FUSION=<fusion-namespace>
    oc get policyassignments.data-protection.isf.ibm.com -n ${PROJECT_FUSION}
    The following output appears when all policies are removed:
    No resources found in ${PROJECT_FUSION} namespace.
  5. In IBM Spectrum Protect Plus, retrieve the spp-connection secret to find the IBM Spectrum Protect Plus URL and user interface credentials:
    oc extract secret/spp-connection --to=- -n ${PROJECT_FUSION}
  6. Log in to IBM Spectrum Protect Plus.
  7. Go to Manage Protection > IBM Spectrum Protect Plus > Backup.
  8. To unassign the policy from the catalog backup, under SLA Policy, clear the check box of the policy that is currently selected, and click Save.

    When no policy is associated with the catalog backup, under SLA Policy Status, the message No entries found. appears.

  9. Uninstall the Backup & Restore (Legacy) service.

    For details, see the topic Uninstalling Backup & Restore (Legacy) in the IBM Storage Fusion documentation.

    Important: You must uninstall the Backup & Restore (Legacy) service before you create backups with the Backup & Restore service. If both services are installed in the cluster, the cluster will have two OADP and Velero deployments, which will cause the Cloud Pak for Data backup precheck process to fail.

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.

Only the IBM Storage Fusion Backup & Restore service is supported. You cannot use the Backup & Restore (Legacy) service.

You must be a cluster administrator or a similar role to create backups.

Procedure

Create IBM Storage Fusion backup and restore resources on the hub:

  1. Create a backup object storage location for the backups.
    1. In IBM Storage Fusion, go to Backup & restore > Locations and click Add location.
    2. Add details for the location and click Add.
  2. Create a backup policy for the Cloud Pak for Data applications, and tie them to the backup storage location.
    1. Go to Backup & restore > Policies and click Add policy.
    2. Add details for the policy.
    3. Under Frequency, schedule when to run the backup policy.
    4. Click Create policy.
    5. 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.
  3. 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.
    1. Go to Backup & restore > Backed up applications and click Protect apps.
    2. From the cluster menu, select the source cluster.
    3. 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.
    4. 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.

    5. If the Cloud Pak for Data scheduling service is installed, repeat these steps to assign the ${PROJECT_SCHEDULING_SERVICE} policy to the scheduling service.
  4. Patch policy assignments with the backup and restore recipe details.
    1. Log in to Red Hat® OpenShift® Container Platform as a cluster administrator.
      ${OC_LOGIN}
      Remember: OC_LOGIN is an alias for the oc login command.
    2. Get each policy assignment name:
      export PROJECT_FUSION=<fusion-namespace>
      oc get policyassignment -n ${PROJECT_FUSION}
    3. 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"}}}'
    4. 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"}}}'
  5. 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
  6. If the recipes are not associated to the correct policy assignments, do the following substeps.
    1. Unassign the policies from the applications.
    2. 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.
      Note:

      4.8.5 The cpdbr service was updated for Cloud Pak for Data 4.8.5. If you are using this Cloud Pak for Data version, or you upgraded to this version, you must install the latest version of the cpdbr service. If you previously installed the service, uninstall it before you install the new version.

    3. Verify that the recipe recipes.spp-data-protection.isf.ibm.com was installed in both projects.
    4. Reassign the policies to the respective applications.
    5. Repeat step 4.

Back up Cloud Pak for Data applications

  1. Go to Backup & restore > Backed up applications.
  2. Select the ${PROJECT_CPD_INST_OPERATORS} application and click Back up now.
    Attention: If you are using IBM Storage Fusion Version 2.6.1 or later fixes, the first backup that you take is not valid and cannot be restored. If Cloud Pak for Data is integrated with the Identity Management Service, the first backup job can take over an hour to time out and fail. Subsequent backups are valid.

    If you are using IBM Storage Fusion Version 2.7.1 or later fixes, the first backup is valid.

    When the ${PROJECT_CPD_INST_OPERATORS} application is backed up, the ${PROJECT_CPD_INST_OPERANDS} project is backed up with it.

  3. If installed, repeat the previous step to back up the ${PROJECT_SCHEDULING_SERVICE} application.

Monitoring backup jobs

  1. To monitor backup jobs, go to Backup & restore > Jobs.
    • Jobs that are listed in the Queue tab are active.
    • Jobs that are listed in the History tab are completed.
  2. 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:
  1. 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"
  2. 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.