[IBM i]

Backups of IBM MQ for IBM i data

Use this information to understand the two types of IBM® MQ backup for each queue manager.

For each queue manager, there are two types of IBM MQ backup to consider:
  • Data and journal backup.

    To ensure that both sets of data are consistent, do this only after shutting down the queue manager.

  • Journal backup.

    You can do this while the queue manager is active.

For both methods, you need to find the names of the queue manager IFS directory and the queue manager library. You can find these in the IBM MQ configuration file (mqs.ini). For more information, see The QueueManager stanza.
Use the following procedures to do both types of backup:
Data and journal backup of a particular queue manager
Note: Do not use a save-while-active request when the queue manager is running. Such a request cannot complete unless all commitment definitions with pending changes are committed or rolled back. If this command is used when the queue manager is active, the channel connections might not end normally. Always use the following procedure.
  1. Create an empty journal receiver, using the command:
    
    CHGJRN JRN(QMTEST/AMQAJRN) JRNRCV(*GEN)
    
  2. Use the RCDMQMIMG command to record an MQM image for all IBM MQ objects, and then force a checkpoint using the command:
    
    RCDMQMIMG OBJ(*ALL) OBJTYPE(*ALL) DSPJRNDTA(*YES) MQMNAME(TEST)
    
  3. End channels and ensure that the queue manager is not running. If your queue manager is running, stop it with the ENDMQM command.
  4. Backup the queue manager library by issuing the following command:
    
    SAVLIB LIB(QMTEST)
    
  5. Back up the queue manager IFS directories by issuing the following command:
    
    SAV DEV(...) OBJ(('/QIBM/UserData/mqm/qmgrs/test'))
    
Journal backup of a particular queue manager
Because all relevant information is held in the journals, as long as you perform a full save at some time, partial backups can be performed by saving the journal receivers. These record all changes since the time of the full backup and are performed by issuing the following commands:
  1. Create an empty journal receiver, using the command:
    
    CHGJRN JRN(QMTEST/AMQAJRN) JRNRCV(*GEN)
    
  2. Use the RCDMQMIMG command to record an MQM image for all IBM MQ objects, and then force a checkpoint using the command:
    
    RCDMQMIMG OBJ(*ALL) OBJTYPE(*ALL) DSPJRNDTA(*YES) MQMNAME(TEST)
    
  3. Save the journal receivers using the command:
    
    SAVOBJ OBJ(AMQ*) LIB(QMTEST) OBJTYPE(*JRNRCV) .........
    

A simple backup strategy is to perform a full backup of the IBM MQ libraries every week, and perform a daily journal backup. This, of course, depends on how you have set up your backup strategy for your enterprise.