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
- A working IBM Spectrum Fusion hub and spoke clusters. For more information, see Prerequisites in IBM Cloud Pak foundational services backup and restore with the IBM Spectrum Fusion.
- Existing backups from the hub cluster. For more information, see Creating a backup in IBM Cloud Pak foundational services backup and restore with the IBM Spectrum Fusion.
- A full identical deployment, preferably restored or the original, to one of the backups. For more information, see Creating a restore in IBM Cloud Pak foundational services backup and restore with the IBM Spectrum Fusion.
Procedure
-
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
-
-
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 theoc get zenservice -n
command.
- Replace
-
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.
- Replace
-
-
Apply the Recipe CR to both the hub and the target cluster with the following command:
oc apply -f <recipe file name>.yaml
-
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.
-
Verify restore. Complete the following steps to check whether the resources are properly replaced at the start of the recipe:
-
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
-
To get into the pod run the following command:
oc -n <operator namespace> exec -it <pod name> bash
-
Navigate to
/tmp/logs: cd /tmp/logs
-
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.
-