What happens if you don’t back up your CF structures?

 View Only

What happens if you don’t back up your CF structures? 

Wed March 04, 2020 12:24 PM

What happens if you don’t back up your CF structures?

Gwydion Tudur
Published on 19/01/2018

We often give the advice that MQ CF structures should be backed up regularly, by which we mean at least every hour. A recent customer problem that I dealt with showed why this is good advice.

Background

MQ application CF structures are used to hold shared queues. As is the case with private queues, queue managers write information to their logs whenever they put or get a persistent message to a shared queue.

A backup of a CF structure can be taken by issuing the BACKUP CFSTRUCT command on one queue manager in the QSG. This writes the current contents of the structure to the log of the queue manager performing the backup.

In some situations, the contents of a CF structure can be lost. This could be due to a problem such as loss of power to the CF, or it could be that the QSG is being started at different site, such as in a DR situation.

In this case the persistent messages on the structure can be recovered by issuing the RECOVER CFSTRUCT command on any queue manager in the QSG (this can also be done automatically by MQ if RECAUTO(YES) has been set on the CFSTRUCT definition). To recover the structure the queue manager must read the logs of all the queue managers in the QSG that used the structure, going back to the last time a backup of the structure was taken. This can take a few minutes on a system with a high volume of persistent messaging, even if the CF structure was backed up recently. Queues on the structure won’t be available until the recovery has completed.

What if there’s no backup?

If the CF structure hasn’t been backed up for a long time, or even never backed up, the queue manager will need to go very far back in the logs of all the queue managers in the QSG to recover the structure. If you’re lucky, this will take a long time, and will almost certainly mean reading archive logs, which could be on tape. The queue manager will issue message CSQE133I periodically to show the progress of the recovery.

If you’re unlucky, the archive logs needed to recover the structure will have been deleted, and there will be no way to recover the persistent messages on the structure. In this case, the only option is likely to be to issue the RECOVER CFSTRUCT TYPE(PURGE) command. This will make the structure available once again for applications to use, but all messages on the structure will have been lost.

Summary

In short, make sure you back up your CF structures regularly!

The queue manager periodically checks whether a backup has been taken of CF structures recently and issues messages CSQ040I or CSQE041E if this is not the case, so it might be worth monitoring for these messages.

 

Entry Details

Statistics
0 Favorited
2 Views
1 Files
0 Shares
1 Downloads
Attachment(s)
pdf file
What happens if you dont back up your CF structures?.pdf   67 KB   1 version
Uploaded - Wed March 04, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.