recovering shared queues, backup, of Coupling Facility structures, recovery, backup and recovery, Coupling Facility (CF), CF structure, BACKUP CFSTRUCT, WebSphere MQ commands, RECOVER CFSTRUCT" />
Recovering shared queues
WebSphere MQ can recover persistent messages on shared queues if all of:
- Backups of the CF structures containing the messages have been performed.
- All the logs for all queue managers in the queue-sharing group are available, to perform recovery from the point the backups are taken.
- DB2 is available and the structure backup table is more recent that the most recent CF structure backup.
The messages on a shared queue are stored in a Coupling Facility (CF) structure. Persistent messages can be put onto shared queues, and like persistent messages on non-shared queues, they are copied to the queue manager log. The MQSC BACKUP CFSTRUCT and RECOVER CFSTRUCT commands are provided to allow the recovery of a CF structure in the unlikely event of a Coupling Facility failure. In such circumstances, any nonpersistent messages stored in the affected structure are lost, but persistent messages can be recovered. Any further application activity using the structure is prevented until the structure has been recovered.
To enable recovery, back up your Coupling Facility list structures frequently using the MQSC BACKUP CFSTRUCT command . The messages in the CF structure are written onto the active log data set of the queue manager making the backup. It writes a record of the backup to DB2: the name of the CF structure being backed up, the name of the queue manager doing the backup, the RBA range for this backup on that queue manager's log, and the backup time. Note that you should back up CF list structures even if you are not actively using shared queues, for example, if you have set up a queue-sharing group intending to make use of it in the future.
You recover a CF structure by issuing an MQSC RECOVER CFSTRUCT command to the queue manager that will do the recovery; we can use any queue manager in the queue-sharing group. We can specify a single CF structure to be recovered, or we can recover several CF structures simultaneously.
As noted previously, it is important that you back up your CF list structures frequently, otherwise recovering a CF structure can take a very long time. Moreover, the recovery process cannot be cancelled.
The definition of a shared queue is kept in a DB2 database and can therefore be recovered if necessary using standard DB2 database procedures.
For more information about the BACKUP CFSTRUCT and RECOVER CFSTRUCT commands, see WebSphere MQ Script (MQSC) Command Reference.
For more information about planning your backup and recovery strategy for queue-sharing groups, see WebSphere MQ for z/OS Concepts and Planning Guide.