Restoring EDB postgresql database

Deploy the EDB postgresql database backup deployment to restore the Identity Management (IM) data from the common-service-db backup resources.

Prerequisites

If the cluster being backed up or restored to uses s390x for architecture, any velero CLI commands must be run on an alternate cluster that does not use s390x and has oc access to the original (usually using oc login). Velero CLI does not yet support s390x.

Restore EDB postgresql database (common-service-db)

Complete the following steps to restore IM data from common-service-db backup resources.

  1. Get the restore object.

     wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts/velero/restore/restore-cs-db.yaml
    
  2. Substitute the __BACKUP_NAME__ with the name of the backup resource that you created previously.

    vi restore-cs-db.yaml
    
  3. Restore the cs-db data.

    oc apply -f restore-cs-db.yaml
    
  4. Check restore progress. Proceed with the next step after restore process is complete.

    velero restore get
    
  5. Check logs of the velero restore to verify that the data was restored.

    velero restore logs restore-zen5-data
    

Troubleshooting restoring EDB postgresql database

If the logs or the data indicate that the restore was not successful, complete the following steps:

  1. Get the restore job:

    wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts/velero/restore/common-service-db/cs-db-restore-job.yaml
    
  2. Replace <cs-db namespace> with the namespace where common-service-db instance is running.

  3. Delete the existing cs-db-backup deployment and cs-db-backup pod.

    oc delete deploy cs-db-backup -n <namespace>
    
  4. Run the restore job.

    oc apply -f cs-db-restore-job.yaml