Roll back and sync Common Service DB and Zen data to a specified backup with IBM Spectrum Fusion

Learn how to roll back and sync Common Service DB and Zen data to a specified backup with IBM Spectrum Fusion.

Prerequisites

Procedure

  1. Download the necessary files.

    • For Common service DB:

        wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts/velero/spectrum-fusion/recipes/4.8-example-csdb-sync-recipe.yaml
        wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts/velero/spectrum-fusion/templates/cs-db-sync-restore-template.yaml
      
    • For Zen:

        wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts/velero/spectrum-fusion/recipes/4.8-example-zen-sync-recipe.yaml
        wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts/velero/spectrum-fusion/templates/zen-sync-restore-template.yaml
      
  2. Edit values in both files. Replace all values inside of <>.

    • For Recipes:

      • Replace <services namespace> with the namespace where Common Service DB or Zen is installed. Common Service DB and Zen should be installed in the same namespace.
      • Replace <operator namespace> with the namespace where the IM or Zen operator is installed. IM and Zen should be installed in the same namespace.
      • If you sync or roll back Zen, replace <zenservice name> with the name of the zenservice resource. You can get the namespace by running the oc get zenservice -n command.
    • For Restore CRs:

      • Replace <application name> with the name of your Spectrum Fusion Application CR.
      • Replace <backup policy name> with the name of your Spectrum Fusion BackupPolicy CR.
      • Replace <backup storage location> with the name of the Spectrum Fusion BackupStorageLocation CR.
      • Replace <backup name> with the job name of the backup from the Spectrum Fusion Hub UI.
      • Replace <services namespace> with the namespace where Common Service DB or Zen is installed. Common Service DB and Zen should be installed in the same namespace.
      • Replace <target cluster> with the cluster name to restore to. This cluster has to already exist as a Spoke cluster that is connected to the Spectrum Fusion Hub cluster. The hub cluster can be used as a target cluster if you perform sync or rollback on the same cluster.
  3. Apply the Recipe CR to both the hub and the target cluster with the following command:

     oc apply -f <recipe file name>.yaml
    
  4. Apply the Restore CR to the hub cluster with the following command:

     oc apply -f <restore file name>.yaml
    

    Restore starts. Watch the progress of the restore in the Spectrum Fusion UI.

  5. Verify restore. Complete the following steps to check whether the resources are properly replaced at the start of the recipe:

    1. Find the IBM Cloud Pak foundational services utils pod in the operator namespace with the following command:

       oc get pods -n <operator namespace> | grep cpfs
      
    2. To get into the pod run the following command:

       oc -n <operator namespace> exec -it <pod name> bash
      
    3. Navigate to /tmp/logs: cd /tmp/logs

    4. Review the most recent cleanup log: cat.

      To check the resource restores worked, see the validation steps in Verifying successful restore in IBM Cloud Pak foundational services backup and restore with the IBM Spectrum Fusion.