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.
We can do this while the queue manager is active.
For both methods, we need to find the names of the queue manager IFS directory and the queue manager library. We 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.
- Create an empty journal receiver, using the command:
CHGJRN JRN(QMTEST/AMQAJRN) JRNRCV(*GEN)
- 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)
- End channels and ensure that the queue manager is not running. If your queue manager is running, stop it with the ENDMQM command.
- Backup the queue manager library by issuing the following command:
SAVLIB LIB(QMTEST)
- Back up the queue manager IFS directories by issuing the following command:
SAV DEV(...) OBJ(('/QIBM/UserData/mqm/qmgrs/test'))
- Create an empty journal receiver, using the command:
- 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:
- Create an empty journal receiver, using the command:
CHGJRN JRN(QMTEST/AMQAJRN) JRNRCV(*GEN)
- 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)
- Save the journal receivers using the command:
SAVOBJ OBJ(AMQ*) LIB(QMTEST) OBJTYPE(*JRNRCV) .........
- Create an empty journal receiver, using the command:
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 the enterprise.
- Journal management on IBM i
- Restoring a complete queue manager (data and journals) on IBM i
Use this information to restore one or more queue managers from a backup or from a remote machine. - Restoring journal receivers for a particular queue manager on IBM i
Use this information to understand the different ways to restore journal receivers.
Parent topic: Availability, backup, recovery, and restart on IBM i