Offline post-restore hooks fail
Restoring an offline backup to the same cluster or to a different cluster fails when post-restore hooks are run.
Symptoms
In the CPD-CLI*.log file, you see the following messages:
status: partially_succeeded
zen/configmap/zen-cnpsql-aux-br-cm: component=zen, op=<mode=post-restore,type=config-hook,method=rule>, status=succeeded
zen/configmap/ibm-cs-postgres-br-cm: component=cs-postgres, op=<mode=post-restore,type=config-hook,method=job>, status=succeeded
zen/configmap/cpd-lite-aux-br-cm: component=lite, op=<mode=post-restore,type=config-hook,method=rule>, status=error
zen/configmap/db2u-aux-br-cm: component=db2u, op=<mode=post-restore,type=config-hook,method=rule>, status=succeeded
time=<timestamp> level=error msg=error performing op postRestoreViaConfigHookRule for resource lite, msg: : zenservices.zen.cpd.ibm.com "lite-cr" not found func=cpdbr-oadp/pkg/quiesce.(*BasicPlanExecutor).applyPlanInternal file=/a/workspace/oadp-upload/pkg/quiesce/planexecutor.go:1535
time=<timestamp> level=info msg=op postRestoreViaConfigHookRule for resource lite took 2m51.045341704s func=cpdbr-oadp/pkg/quiesce.(*BasicPlanExecutor).applyPlanInternal file=/a/workspace/oadp-upload/pkg/quiesce/planexecutor.go:1545
Causes
The zenService custom resource lite-cr was not restored.
Resolving the problem
Delete the IBM® Software Hub instance projects and restart the restore.
Tip: If you have a time constraint, restart the restore from the step that restores
Kubernetes
zenService
resources:
cpd-cli oadp restore create <restore-name4> \
--from-backup=<backup-name1> \
--include-resources='namespaces,secrets,configmaps,certificates.cert-manager.io,certificates.certmanager.k8s.io,issuers.cert-manager.io,issuers.certmanager.k8s.io,zenservices' \
--skip-hooks \
--log-level=debug \
--verbose