IBM WebSphere provides a good utility called saveqmgr that enables you to save all the objects, such as queues, channels, etc, defined in a either local or remote queue manager to a file. You can then easily modify the file and use it to alter the definition of the same or another queue manager.
The saveqmgr is very easy to use. All what you need to do is
- Download the utility from IBM For windows you just need to unzip the file preferably in IBM WebSsphere bin directory
- To export the queue manager objects use the following command saveqmgr.exe -m qmName > outputFile
- To import the queue manager objects ensure that queue manager is running and then use the following command runmqsc qmName < outputFile
This is the best way to back up the WMQ objects. Note that there is also a saveqmgrc client version of the command. If you allow remote administration (preferably authenticated with SSL) you can run saveqmgrc from a central server and collect all of the object definitions across the network in one place.
If you want to back up the entire QMgr to restore it later, there are a few other things you might want to save.
amqoamd -s
This saves off all of the authorization profiles as setmqaut commands. If you use generic profiles (such as “SYSTEM.**”) on UNIX platforms, you will need to edit the resulting file because amqoamd does not quote the asterisks. If you run it as-is, the asterisks are expanded by the shell and you don’t get the expected results.
Also remember to back up the mqs.ini file, the qm.ini file, the contents of any exit directories and any exit parameter files.
It might seem simpler just to back up the files under MQ. This usually is not the case because you capture in-flight messages that get restored later. Also, the queue managers must be stopped if file-system backups are to be relied on. Usually easier to restore the configuration to a new, empty QMgr rather than from files.
Thanks for the additional valuable information Rob