Backing up EDB PostgreSQL database

Set the EDB backup deployment to store the Identity Management (IM) data in 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 Opens in a new tab .

  • When you add a service credential to the bucket, include the hash-based message authentication code (HMAC). For more information, see Service credentials Opens in a new tab . 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:// or https://.
  • 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.

Back up EDB database (common-service-db)

Complete the following steps to back up EDB database for IM:

  1. Get the common-service-db backup resources.

    wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts-adopter/velero/schedule/common-service-db/cs-db-backup-deployment.yaml
    wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts-adopter/velero/schedule/common-service-db/cs-db-backup-pvc.yaml
    wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts-adopter/velero/schedule/common-service-db/cs-db-br-script-cm.yaml
    wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts-adopter/velero/schedule/common-service-db/cs-db-role.yaml
    wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts-adopter/velero/schedule/common-service-db/cs-db-rolebinding.yaml
    wget https://raw.githubusercontent.com/IBM/ibm-common-service-operator/scripts-adopter/velero/schedule/common-service-db/cs-db-sa.yaml
    
  2. Update the backup files.

    • Replace <cs-db namespace> with the namespace where common-service-db instance is running.
    • Replace the <storage class> with the storage class that the current IM deployment uses.
  3. Add the PVC to the cluster.

    oc apply -f cs-db-backup-pvc.yaml
    
  4. Add the cs-db-br-script-cm.yaml to the correct namespace

    oc apply -f cs-db-br-script-cm.yaml
    
  5. Give the common-service-db backup necessary permissions

    oc apply -f cs-db-sa.yaml
    
    oc apply -f cs-db-role.yaml
    
    oc apply -f cs-db-rolebinding.yaml
    
  6. Add the deployment to the cluster.

    oc apply -f cs-db-backup-deployment.yaml