Importing a WebSphere MQ V5.3 or an IBM MQ V8 queue manager by using importmqm

Use importmqm to import configuration and queue data exported from a WebSphere MQ V5.3 or IBM® MQ V8 queue manager using mig/exportmqm or exportmqm.

The importmqm utility has the following syntax:

importmqm -f ExportedFileName [-m QueueManagerName]

Where ExportedFileName is the name of the file that you are importing from, and -m QueueManagerName optionally specifies a new name for the imported queue manager.

For example:
importmqm -f MQ5EXPORT.MQ1.20170329-083048-1778385097.tar.Z  -m newQM

importmqm imports object configuration, channel synchronization information, security settings, and, if selected, the messages on the application local queues. The utility does not require any environment variables and must not be run in an environment where WebSphere MQ V5.3 environment variables are set.

Because importmqm uncompresses and untars the input file created by the exportmqm utility, and creates a directory of the same name, it must not be run in the same directory as the exportmqm utility.

The importmqm utility verifies that it has access to the \tmp directory on the system, and also that it can run the commands that are needed (for example, mkdir, tar). If any of these required commands cannot be run, the utility stops.

All checks and steps performed by the importmqm utility are recorded in a log file which is located in the local directory.

The importmqm utility uncompresses and untars the input tarball into a working directory located in the same directory where the utility is run.

The utility then creates and starts a queue manager with the same name as the source queue manager, or with the queue manager name specified by the -m argument. If the queue manager is imported under a new name, the Channel Synchronization records are not migrated, and remote channels might have to be reset.

You are asked if you want to import messages that were on the application local queues of the source queue manager. If you answer YES at the prompt, all messages in each queue file are loaded into the queue whose name is determined from the name of the file containing the messages in the working directory.

The utility creates all the non SYSTEM* objects that were in the source queue manager, creates principals in the principal database, sets authorizations for users and objects, loads the channel synchronization data records, and, if present, copies in the SSL files to the queue manager SSL directory. If a User Name in the principal database on the source queue manager is not also a user on the system where the import utility is being run, a message is displayed, and no attempt is made to add that user to the principal database. The utility continues to run.

As the utility importmqm runs, details of what it is doing are displayed. All the steps are also recorded in the log file.

After the importmqm utility has finished, the log file that is located in the same directory can be reviewed.

While cluster attributes for objects are preserved, the Full Repository status of the queue manager itself is not and has to be manually preserved by using the runmqsc ALTER QMGR REPOS() command.

Cluster channels are not imported either, and have to be defined manually to integrate an imported queue manager into a cluster. To speed up this process, importmqm generates a file named queue_manager_cluster_channel_definitions.mqsc in the working directory it is called from. This file contains the cluster channel definitions of the exported queue manager and can be used as input for runmqsc.