Example export
An example export from IBM® WebSphere® MQ V5 and import to IBM MQ V8.
Before you begin
About this task
This example exports the queue manager BOB from an IBM WebSphere MQ V5 configuration and imports it to an IBM MQ V8 configuration.
Procedure
-
Complete the following steps to export the queue manager from the IBM
WebSphere MQ V5 configuration:
-
Copy the contents of the directory
MQ8path/opt/mqm/bin/mig to a working location on the IBM
WebSphere MQ V5 system. We assume that
IBM
WebSphere MQ V5 is installed at /home/mqv5/
and IBM MQ V8 at
/home/mqv8/.
/home/mqv5> mkdir -p /home/mqv5/migration/tools /home/mqv5> cp /home/mqv8/opt/mqm/bin/mig/* /home/mqv5/migration/tools/ /home/mqv5> cd /home/mqv5/migration/
-
Set the executable flags for the copied files:
/home/mqv5/migration> chmod 755 /home/mqv5/migration/tools/*
-
Make the files visible to the environment and verify access:
/home/mqv5/migration> export PATH=/home/mqv5/migration/tools/:${PATH} /home/mqv5/migration> type exportmqm exportmqm is /home/mqv5/migration/tools/exportmqm
-
Set up the IBM
WebSphere MQ V5 environment, for example, by
sourcing the
wmqprofile
./home/mqv5/migration> . /home/mqv5/var/mqm/wmqprofile
-
Start the command server.
/home/mqv5/migration> strmqcsv BOB WebSphere MQ command server started.
- Put the queue manager into a quiet state, that is, stop all channels and disconnect all applications.
-
Run exportmqm. During the export you are asked if queue data is to be
exported. The following text is a log of an example run:
/home/mqv5/migration> exportmqm -m BOB #--------------------------------------------------------- # Welcome to the HPE NonStop Server V53 export utility # for WebSphere MQ version 5.3.1 for HP NonStop Server # # # MQ owner : MQM.MANAGER 47,5 # # System Name : CS3 # RVU : J06.20.00 # UNAME : NONSTOP_KERNEL cs3 J06 20 NSE-AG # Script version : 8.1.0.2 # # Wed Nov 13 17:02:16 MET 2019 # # ======================= # - does not export SYSTEM objects # - does not export EMS collector information # - does not export PATHWAY configurations # - does not export partitioning configuration for queue files # # - Please make sure that your queue manager is backed up, # in case something goes unexpectedly wrong. #--------------------------------------------------------- # OSS export directory name = MQ5EXPORT.BOB.20191113-170216-889194440 # Verifying the Queue Manager is running # Validating that the Queue Manager is in a valid state to be exported. # Checking to confirm no channels are active # No Channels Active. Continuing.... # Checking to confirm no Queues are open # No Queues Open. Continuing.... # # BOB ready for migration # All checks have been made and this queue manager is now ready to be exported. Please type YES if you would like to migrate all messages on application queues default[NO]yes Messages in LOCAL QUEUE's will be migrated Local queues that start with SYSTEM are not application queues therefore messages on those queues will not be migrated # Exporting Queue Manager's objects. # Exporting Queue Manager's channel syncronization data. # Exporting Queue Manager's object authorities. # Exporting Queue Manager's principal database. # Exporting Queue Manager's Local Queue's # Exporting queue FROM.ALICE # Exporting queue PERSIST.Q # Exporting queue XQ.TO.ALICE # Exporting Queue Manager's qm.ini file. # Checking if Queue Manager has ssl files # Exporting Queue Manager's ssl files # The Queue Manager BOB has been successfully exported. # Please move the following files to the location from where you will # run the MQv8 importmqm utility from: # MQ5EXPORT.BOB.20191113-170216-889194440.tar.Z # MQ5EXPORT.BOB.20191113-170216-889194440.tar.Z.md5 # These are the files the MQv8 importmqm utility will use to create and # configure a new MQv8 Queue Manager with the same name: 'BOB'
- Remove the queue manager from clusters as described in Removing a queue manager from a cluster.
-
End the queue manager.
/home/mqv5/migration> endmqm BOB WebSphere MQ queue manager 'BOB' ended.
-
Copy the contents of the directory
MQ8path/opt/mqm/bin/mig to a working location on the IBM
WebSphere MQ V5 system. We assume that
IBM
WebSphere MQ V5 is installed at /home/mqv5/
and IBM MQ V8 at
/home/mqv8/.
-
Complete the following steps to import the queue manager to the IBM MQ V8 configuration:
-
Copy the exported queue manager archive and checksum file to a working directory and verify the
checksums. We assume that IBM MQ V8 is installed at
/home/mqv8/.
/home/mqv8> mkdir /home/mqv8/migration /home/mqv8> cd /home/mqv8/migration /home/mqv8/migration> cp <path/to/archive> /home/mqv8/migration/ /home/mqv8/migration>md5sum --check ./MQ5EXPORT.BOB.20191113-170216-889194440.tar.Z.md5 MQ5EXPORT.BOB.20191113-170216-889194440.tar.Z: OK
-
Set up the IBM MQ V8 environment, for example, by
sourcing the
mqprofile
. -
Run importmqm. The import is interactive and asks for several inputs and
might create a file
qmgrname_ClusterChannelDefs.mqsc, which contains cluster channel
definitions. Depending on the system configuration, it might be better to ignore errors if asked
(for example, if migrating between systems and not all users have been migrated to the new
system). The following text is a log of an example run:
/home/mqv8/migration: importmqm -f MQ5EXPORT.BOB.20191113-170216-889194440.tar.Z #--------------------------------------------------------- # Welcome to the HPE NonStop Server V8 import utility # for IBM MQ Version 8 for HP NonStop Server and # WebSphere MQ version 5.3.1 for HP NonStop Server. # # # MQ owner : MQM.MANAGER 47,5 # # System Name : CS5 # RVU : L19.08.00 # UNAME : NONSTOP_KERNEL cs5 L19 08 NSX-G # Script version : 8.1.0.2 # # Wed Nov 13 17:13:39 MET 2019 # # ======================= # - does not import CLUSTER channels # - does not import SYSTEM objects # - does not import EMS collector information # - does not import partitioning configuration for queue files # - does not import Listener configurations # #--------------------------------------------------------- # Log files will be written to /home/mqv8/migration #--------------------------------------------------------- This utility will now create a new MQv8 Queue Manager named BOB If you want to set any additional non-default 'crtmqm' options please enter YES default[NO]yes Please enter the 'crtmqm' options you wish to set -h 512 The Queue Manager will be created with the following options: 'crtmqm -h 512 BOB' OK to continue? default[NO]yes # Creating the Queue Manager # Queue Manager BOB has been created # Starting the Queue Manager # Queue Manager BOB has started # BOB ready for migration # All checks have been made and this queue manager is now ready to be configured and loaded... Using CCSID 819 CERTVPOL file not found... Using CERTVPOL ANY No CONNAUTH file found, using default DEADQ file found... Using DEADQ 'CUSTOM.DL.QUEUE' # Restarting the Queue Manager # Queue Manager BOB has ended # Queue Manager BOB has started Please type YES if you would like to migrate all messages from exported application local queues default[NO]yes Messages in LOCAL QUEUE's will be migrated Local queues that start with SYSTEM are not application queues therefore messages on those queues will not be migrated # Channel EXIT configurations, queue process and process definitions will be imported. # Generating Cluster Channel Definitions file. # Importing Queue Manager's object definitions Please type YES if you would like to ignore errors during this process default[NO]yes # Removing SSL environment settings... Please type YES if you would like to retain the following environment variables: AMQ_SSL_V3_ENABLE=1 AMQ_SSL_WEAK_CIPHER_ENABLE=ALL These may be required for channels using deprecated CIPHER SPECS. default[NO]yes Keeping environment variables. # Importing Queue Manager's channel syncronization data. # Importing Queue Manager's object authorities. Please type YES if you would like to ignore errors during this process default[NO]yes # Importing Queue Manager's principal database. Loading Queue Data... from MQ5EXPORT.BOB.20191113-170216-889194440/queues-manifest.txt Number of messages in exported Queue 'FROM.ALICE': 4 Number of messages imported into Queue 'FROM.ALICE': 4 Number of messages in exported Queue 'PERSIST.Q': 5 Number of messages imported into Queue 'PERSIST.Q': 5 Number of messages in exported Queue 'XQ.TO.ALICE': 3 Number of messages imported into Queue 'XQ.TO.ALICE': 3 # Checking if Queue Manager has ssl files # Importing Queue Manager's ssl files # The Queue Manager BOB has been successfully migrated. Do you want to shutdown the created Queue Manager? default[NO]no # Queue Manager BOB will not be shutdown.
- Verify that the queue manager has the correct settings and add configurations for listeners.
-
Integrate the queue manager into clusters if required. This procedure includes setting the qmgr
attributes as well as defining the channels, which might have to be changed. Channels can be
configured (after verification) by using
qmgrname_ClusterChannelDefs.mqsc as an input file (this file might
require editing).
/home/mqv8/migration> vim BOB_ClusterChannelDefs.mqsc /home/mqv8/migration> runmqsc BOB < BOB_ClusterChannelDefs.mqsc Starting MQSC for queue manager BOB. ... AMQ8014: IBM MQ channel created. ... AMQ8014: IBM MQ channel created. MQSC > : MQSC > 2 MQSC commands read. No commands have a syntax error. All valid MQSC commands were processed.
Note:Versions before V8.1.0.2 did not encode its source in the filename and the file is not unique (that is, it will be replaced by each run of importmqm), be mindful of this when trying to import multiple queue managers.
-
Copy the exported queue manager archive and checksum file to a working directory and verify the
checksums. We assume that IBM MQ V8 is installed at
/home/mqv8/.