Periodically, you might want to take a backup copy of your queue manager data to protect against possible corruption caused by hardware failures. However, because message data is often short-lived, you might choose not to take backups.
To take a backup copy of a queue manager's data:
If possible, stop your queue manager in an orderly way. Try executing endmqm -w (a wait shutdown); only if that fails, use endmqm -i (an immedIate shutdown).
Note: | You might have some difficulty in understanding the names that appear in the directory. The names are transformed to ensure that they are compatible with the platform on which you are using WebSphere MQ. For more information about name transformations, see Understanding WebSphere MQ file names. |
Make sure that you do not miss any files, especially the log control file and the configuration files. Some of the directories might be empty, but you need them all to restore the backup at a later date, so save them too.
To restore a backup of a queue manager's data:
Check the resulting directory structure to ensure that you have all the required directories.
See Appendix B, Directory structure (Windows systems) and Appendix C, Directory structure (UNIX systems) for more information about WebSphere MQ directories and subdirectories.
Make sure that you have a log control file as well as the log files. Also check that the WebSphere MQ and queue manager configuration files are consistent so that WebSphere MQ can look in the correct places for the restored data.
If the data was backed up and restored correctly, the queue manager will now start.
Note: | Even though the queue manager data and log files are held in different directories, back up and restore the directories at the same time. If the queue manager data and log files have different ages, the queue manager is not in a valid state and will probably not start. If it does start, your data is likely to be corrupt. |