Recovering page sets
If the queue manager has terminated due to a failure, the queue manager can normally be restarted with all recovery being performed during restart. However, such recovery is not possible if any of your page sets or log data sets are not available. The extent to which we can now recover depends on the availability of backup copies of page sets and log data sets.
To restart from a point of recovery have:
- A backup copy of the page set that is to be recovered.
- If you used the "fuzzy" backup process described in Method 2: Fuzzy backup, the log data set that included the recorded RBA value, the log data set that was made by the ARCHIVE LOG command, and all the log data sets between these.
- If you used full backup, but you do not have the log data sets following that made by the ARCHIVE LOG command, run the FORMAT TYPE(REPLACE) function of the CSQUTIL utility against all you page sets.
To recover a page set to its current state, also have all the log data sets and records since the ARCHIVE LOG command.
There are two methods for recovering a page set. To use either method, the queue manager must be stopped.
Simple recovery
This is the simpler method, and is appropriate for most recovery situations.
- Delete and redefine the page set you want to restore from backup.
- Use Access Method Services REPRO to copy the backup copy of the page set into the new page set. Define your new page set with a secondary extent value so that it can be expanded dynamically.
Alternatively, we can rename your backup copy to the original name, or change the CSQP00xx DD statement in your queue manager procedure to point to your backup page set. However, if you then lose or corrupt the page set, you will no longer have a backup copy to restore from.
- Restart the queue manager.
- When the queue manager has restarted successfully, we can restart your applications
- Reinstate your normal backup procedures for the restored page.
Advanced recovery
This method provides performance advantages if you have a large page set to recover, or if there has been a lot of activity on the page set since the last backup copy was taken. However, it requires more manual intervention than the simple method, which might increase the risk of error and the time taken to perform the recovery.
- Delete and redefine the page set you want to restore from backup.
- Use Access Method Services REPRO to copy the backup copy of the page set into the new page set. Define your new page set with a secondary extent value so that it can be expanded dynamically.
Alternatively, we can rename your backup copy to the original name, or change the CSQP00xx DD statement in your queue manager procedure to point to your backup page set. However, if you then lose or corrupt the page set, you will no longer have a backup copy to restore from.
- Change the CSQINP1 definitions for your queue manager to make the buffer pool associated with the page set being recovered as large as possible. By making the buffer pool this large, you might be able to keep all the changed pages resident in the buffer pool and reduce the amount of I/O to the page set.
- Restart the queue manager.
- When the queue manager has restarted successfully, stop it (using quiesce) and then restart it using the normal buffer pool definition for that page set. After this second restart completes successfully, we can restart your applications
- Reinstate your normal backup procedures for the restored page.
What happens when the queue manager is restarted
When the queue manager is restarted, it applies all changes made to the page set that are registered in the log, beginning at the restart point for the page set. WebSphere MQ can recover multiple page sets in this way. The page set is dynamically expanded, if required, during media recovery.
During restart, WebSphere MQ determines the log RBA to start from by taking the lowest value from the following:
- Recovery LSN from the checkpoint log record for each page set.
- Recovery LSN from page zero in each page set.
- The RBA of the oldest incomplete unit of recovery in the system at the time the backup was taken.
All object definitions are stored on page set zero. Messages can be stored on any available page set.