To backup all MQ object definitions (queues, topics, channels, etc.) from a queue manager in one line, use the dmpmqcfg
command — it’s IBM’s standard tool for exporting MQ configuration.
✅ One-liner to export all MQ object definitions:
dmpmqcfg -m MYQMGR -a -o 1line > mq_backup.mqsc
Explanation:
-m MYQMGR
→ the queue manager name-a
→ dump all object types-o 1line
→ output in single-line MQSC format (great for scripting/restoring)> mq_backup.mqsc
→ redirect to a file
✅ To restore it later:
runmqsc MYQMGR < mq_backup.mqsc
This will recreate all defined objects (except dynamic/temporary ones) on the target queue manager.