Object exports turn the invisible repository inside a queue manager into files humans and pipelines can read, diff, and replay. When you inherit a fifteen-year-old queue manager nobody documented, export is how you discover four hundred queues and eighty channels before changing anything. When you migrate from on-prem to cloud, export is the starting point for edited DEFINE scripts on the new platform. When auditors ask what production looked like last Tuesday, export snapshots answer. IBM MQ offers multiple export paths—SAVEOBJECT in MQSC, dmpmqcfg utilities, MQ Explorer wizards, PCF bulk inquire converted to scripts, REST JSON downloads—each with different completeness and format. This tutorial compares export methods, explains how to convert DISPLAY output into DEFINE scripts, sanitize host-specific values for migration, integrate exports with Git and CI drift detection, and avoid common traps like exporting without authority records or keystores then wondering why restore fails authentication.
Binary repository files in the queue manager directory are not friendly for code review. Text exports diff in Git pull requests: you see MAXDEPTH changed from 50000 to 100000. Exports also restore across platforms when file paths differ—MQSC is more portable than raw directory copy between Windows and Linux. File backup still matters for disaster recovery speed; exports matter for governance and migration clarity.
| Method | Output form | Best for |
|---|---|---|
| SAVEOBJECT | MQSC-like file from QM | Quick full snapshot on supported releases |
| dmpmqcfg / crtmqcfg | Structured config dump | Distributed backup/restore pairs |
| Explorer export | Selected MQSC text | Ad hoc, legacy discovery |
| Scripted DISPLAY | Custom filtered lists | Partial exports (channels only) |
| REST GET | JSON | Cloud pipelines, OpenAPI tools |
SAVEOBJECT saves definitions from the active repository to a path the queue manager can write—often on the server filesystem, not your laptop unless shared mount. Parameters control which objects and whether security definitions are included per IBM documentation. After export, copy the file to secure backup storage. Import on another queue manager may use corresponding load commands or manual runmqsc editing. Test round-trip in lab: export QM_TEST, create QM_RESTORE empty, import, compare DISPLAY counts.
123/* Example pattern — verify exact syntax on your MQ version */ SAVEOBJECT('*') OBJTYPE(ALL) PATH('/var/mqm/export/qm1-full.mqsc') /* Review file on server; transfer to Git after sanitization */
Manual method: DISPLAY QLOCAL(*) ALL, capture output, hand-convert to DEFINE QLOCAL(...) REPLACE with attributes. Error-prone at scale. Scripts and third-party tools parse DISPLAY into DEFINE. Partial exports list only payment queues matching PAY.*. Use for compliance reports listing channel CONNAME and SSL settings. Always add REPLACE for idempotent re-import unless creating fresh QM.
Object export is printing the catalog of every mailbox and hallway in the building—not shipping the letters inside the boxes.
Custom Java or Python programs loop PCF inquire all queues and emit JSON or MQSC. REST admin GET collections with pagination suit cloud automation. Handle rate limits and command server load. Store output in artifact bucket with timestamp. Drift detection job diffs today’s JSON to main branch and opens ticket if different.
Exports may list AUTHINFO LDAP bind DNs, channel certificates labels, and partner IP addresses—classify exports as confidential. Redact before attaching to public tickets. Do not store in unencrypted object storage. Keystore passwords must never appear in MQSC; if they do, rotate immediately.
After import, run scripts that COUNT objects and compare to export manifest. START channels in test. Application teams run regression. Compare dspmqaut to expected matrix. Only then promote import script to production change window.
Object export is writing down a list of every mailbox name and rule so you can build the same post office somewhere else.
Export lab QM with your site’s standard tool; count queues in file versus DISPLAY QLOCAL(*).
Edit export for migration: change two CONNAME values and document why.
Design a weekly drift job comparing export hash to Git main.
1. Object export contains:
2. SAVEOBJECT is:
3. Migration export must edit:
4. Explorer export helps: