Backing up and restoring queue manager configuration using the OpenShift CLI

Backing up queue manager configuration can help you to rebuild a queue manager from its definitions if the queue manager configuration is lost. This procedure does not back up queue manager log data. Because of the transient nature of messages, historical log data is likely to be irrelevant at the time of restore.


Before starting

Log into the cluster using cloudctl login (for IBM Cloud Pak for Integration), or oc login.


Procedure

  • Back up queue manager configuration.

    We can use the dmpmqcfg command to dump the configuration of an IBM MQ queue manager.

    1. Get the name of the pod for the queue manager. For example, you could run the following command, where queue_manager_name is the name of our QueueManager resource:
      oc get pods --selector app.kubernetes.io/name=ibm-mq,app.kubernetes.io/instance=queue_manager_name
    2. Run the dmpmqcfg command on the pod, directing the output into a file on your local machine.

      dmpmqcfg outputs the queue manager's MQSC configuration.

      oc exec -it pod_name -- dmpmqcfg > backup.mqsc

  • Restore queue manager configuration.

    Having followed the backup procedure outlined in the previous step, we should have a backup.mqsc file that contains the queue manager configuration. We can restore the configuration by applying this file to a new queue manager.

    1. Get the name of the pod for the queue manager. For example, you could run the following command, where queue_manager_name is the name of our QueueManager resource:
      oc get pods --selector app.kubernetes.io/name=ibm-mq,app.kubernetes.io/instance=queue_manager_name
    2. Run the runmqsc command on the pod, directing in the content of the backup.mqsc file.
      oc exec -i pod_name -- runmqsc < backup.mqsc

Parent topic: Use the IBM MQ Operator and certified containers