IBM Support often receive queries and requests for assistance from customers who are planning to migrate their IBM MQ Managed File Transfer (MFT) configurations between systems. This can be for either server upgrades, using the same operating system (OS) as they always have, or a switch to a completely new platform, for example. Current systems might have numerous agents, each running multiple resource monitors and/or schedule transfers and so the migration might be a daunting prospect!
To help make things easier, this blog post describes the core steps required to successfully achieve a migration of MFT configurations to a new system or platform. The discussion is primarily focused on MFT configuration migration but also touches on queue manager migration where appropriate. In summary, the high-level approach to the migration consists is twofold; firstly taking a back-up of configurations on an existing system and secondly using the back-ups to recreate the system elsewhere. Please also note that cluster queue manager is not discussed in this blog.
[Important point!] Before starting, ensure that any agents to be migrated have completed any in-progress or pending transfers.
So let’s begin!
Now, a well-planned and safe migration should always begin by taking a back-up of a number of configuration components:
• The coordination queue manager
• Agent queue managers
• Resource Monitors
• Transfer Templates
• Scheduled Transfers
The following migration procedure is described based on the scenario I took as an example. In this case, QMA is both the coordination queue manager for topology and the agent queue manager for an agent called Agent1. Agent1 has a monitor, transfer template and scheduled transfer. QMA also connects to a queue manager called QMB running on another system using their sender and receiver channels for file transfers.
Migrating the MFT configuration on System 1
1. Save the queue manager configuration using the “dmpmqcfg” command to rebuild it later from its definition. For example:
dmpmqcfg -m QMA -a > /mq/backups/QMA.mqsc
2. Back up the agent’s configuration files that are stored under MQ data directory “/MQ_DATA_PATH/mqft”. The mqft directory normally has three subdirectories “config”, “installation” and “logs” and they contain agent installation data, configuration and database logger files.
If the agent is Protocol Bridge Agent, the ProtocolBridgeCredentials.xml in the agent configuration directory also needs to backed up. It defines the user names and credential information that the protocol bridge agent uses to authorize itself with the protocol server.
3. Export resource monitor’s configuration to a XML file using MFT command “fteListMonitors” with “-ox” option. For example:
fteListMonitors -ma Agent1 -mn Monitor -ox Monitor1Definition.xml
4. Export transfer templates to XML files using “fteListTemplates” with “-x” “-o” options. For example, the following command would create TransferTemplate1.xml in the current directory:
fteListTemplates -x -o . TransferTemplate1
5. Manually back up the scheduled transfer definitions. It is not possible to export them to XML files but scheduled transfers can be listed using “fteListScheduledTransfers” command and backed up manually.
6. Recreate queue manager QMA after installing MQ and MFT on the new system.
7. Restore QMA configuration by running “runmqsc” command by parsing in the queue manager configuration saved in Step 1. For example:
runmqsc QMA< /mq/backups/QMA.mqsc
8. Re-create the sender and receiver channels that connect to QMB on System 2.
9. On QMB queue manager side, update the connections details such as host name and port number of the sender channel that connects to QMA.
10. Re-create Agent1 by simply copying all of the backed up agent configuration files to the new system and start the agent.
11. Import the XML file for Monitor1 using “fteCreateMonitor” command with “-ix” and “-f” options. For example:
fteCreateMonitor -ix Monitor1Definition.xml –f
12. Publish a message containing the contents of TransferTemplate1.xml in the message body to the SYSTEM.FTE topic on the coordination queue manager, using either a stand-alone application or an IBM Integration Bus (IIB) message flow, and specifying the topic string:
<template_id> is the transfer template ID that can be found inside TransferTemplate1.xml. For example, if the xml contains: <?xml version="1.0" encoding="UTF-8"?><transferTemplateid="a7838085-0f2a-4980-b958-2dbbdfb22702" version="6.00"> then the topic string should be:
Although the “fteListTemplates” command allows a transfer template definition to be exported to a XML file, it is not possible to pass that XML file to “fteCreateTemplate” to recreate that transfer template. A Request For Enhancement (RFE) has been raised against the MQ Managed File Transfer component to see if “fteCreateTemplate” can be updated to add this in a future release (
13. Recreate the scheduled transfers manually using “fteCreateTransfers” command.
What’s shown above only explains how to backup and restore MFT configurations. If you are migrating MFT to a new machine with same OS, queue manager data and log files can be backed up and restored by copying all the data files from the old system to the appropriate directories on the new system. However, if it has a different OS, it is not possible to migrate the data files because they are created platform specific.
More information on the FTE tooling commands above:
Backing up and restoring IBM MQ queue manager configuration and data: