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
-
Download the CASE package and extract the
installer-scripts
directory. For more information, see Downloading scripts for additional configuration from specific version CASE bundle. -
Set up any Amazon S3-compatible storage. For example, you can create a bucket in IBM Cloud Object Storage. For more information, see IBM Cloud Object Storage .
-
When you add a service credential to the bucket, include the hash-based message authentication code (HMAC). For more information, see Service credentials . From the Cloud Object Storage navigation menu, gather the following information:
access key id
, which can be found on the Service credentials page that is associated with the bucket.secret access key
, which can be found on the Service credentials page that is associated with the bucket.bucket name
, which can be found on the Buckets page.bucket region
, which can be found on the Buckets page.root directory name
, which is the path in the bucket where you want to store the backups.-
s3 URL
, which is the endpoint URL of the bucket.Note: The endpoint URL must start with
http://
orhttps://
.
- Set up Velero on the new cluster. For more information, see Create the backup resources section.
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.
-
Get the restore object.
wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts/velero/restore/restore-cs-db.yaml
-
Substitute the
__BACKUP_NAME__
with the name of the backup resource that you created previously.vi restore-cs-db.yaml
-
Restore the
cs-db
data.oc apply -f restore-cs-db.yaml
-
Check restore progress. Proceed with the next step after restore process is complete.
velero restore get
-
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:
-
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
-
Replace
<cs-db namespace>
with the namespace where common-service-db instance is running. -
Delete the existing cs-db-backup deployment and cs-db-backup pod.
oc delete deploy cs-db-backup -n <namespace>
-
Run the restore job.
oc apply -f cs-db-restore-job.yaml