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

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