Media images on IBM i
On IBM® i, a media image is a complete copy of an IBM MQ object that is recorded in the journal. Some corrupt or damaged objects can be automatically recovered from their media image.
An IBM MQ object of long duration can represent a large number of journal entries, going back to the point at which it was created. To avoid this, IBM MQ for IBM i has the concept of a media image of an object.
- Media recovery entry for each queue manager object.
- Oldest entry from within this set (see error message AMQ7462 in Journal management on IBM i for details.
Images of the *CTLG object and the *MQM object are taken regularly because these objects are crucial to queue manager restart.
RCDMQMIMG OBJ(*ALL) OBJTYPE(*ALL) MQMNAME(Q_MGR_NAME)
IBM MQ automatically records an image of an object, if it finds a convenient point at which an object can be compactly described by a small entry in the journal. However, this might never happen for some objects, for example, queues that consistently contain large numbers of messages.
Rather than allow the date of the oldest media recovery entry to continue for an unnecessarily
long period, use the IBM MQ command
RCDMQMIMG
, which enables you to take an image of selected objects manually.
Recovery from media images
IBM MQ automatically recovers some objects from their media image if it is found that they are corrupt or damaged. In particular, this applies to the special *MQM and *CTLG objects as part of the normal queue manager startup. If any syncpoint transaction was incomplete at the time of the last shutdown of the queue manager, any queue affected is also recovered automatically, in order to complete the startup operation.
You must recover other objects manually, using the IBM MQ command RCRMQMOBJ
. This command replays
the entries in the journal to re-create the IBM MQ
object. Should an IBM MQ object become damaged, the only
valid actions are to delete it or re-create it by this method. Note, however, that nonpersistent
messages cannot be recovered in this fashion.