Export and import command options

The following table lists the required and optional parameters for the mqsexport and mqsimport commands.






Name of file being exported or imported.

user id


User ID for exporting and importing.



Name of a file containing patterns and the regular expressions (if any) associated with them. Instead of entering the patterns and expressions each time you export or import, you can create a text file containing all the objects your organization exports or imports, and then read those patterns in at the end of the command. If you use an option file, you do not need a pattern.


An option file is a text file containing command prompt options, patterns, and pattern masks. Note that the regular expressions after the patterns are not enclosed in double quotes in the option file.

--collection pattern


View Control Collection Pattern.

--create-promote-translate-file file_name


Creates the Promote Translate File Name (see the documentation for the file format). To create translation for all models in a profile use --model ".*"

Only valid for model import (--profile pattern --model pattern).

--dashboard pattern


Dashboard Pattern.

--dashboard-translate-file file_name


Dashboard Translate File Name (see the documentation for the file format).

--event-action-pipeline pattern


Event Action Pipeline Pattern.

--event-contact pattern


Event Contact Pattern.

--event-format pattern


Event Format Pattern.

--event-rule pattern


Event Rule Pattern.

--event-template pattern


Event Template Pattern.

--event-trigger pattern


Event Trigger Pattern.

--event-suppression pattern


Event Suppression Pattern (PhysicalInstPath:PhysicalTypePath).

--group pattern


Group Name Pattern.

--group-tab pattern


Group Tab Pattern.

--history-rule pattern


History Rule Pattern.

--history-template pattern


History Template Pattern.

--image pattern


Image Pattern.

--logical-instance pattern


Logical Instance Pattern (LogicalInst:LogicalType).

--logical-type pattern


Logical Type Pattern.

--model pattern


Exports or imports all objects associated with a transaction pathway. Because a transaction pathway with the same name can appear in several profiles, you must specify --profile and --promote-option when using --model.



Overwrite of read-only user and group object (implying -f on those objects).

--physical-view pattern


Physical View Pattern.

--policy-agent-policy pattern


Imports the Agent Policies matching the pattern.

--policy-agent-policy-group pattern


Imports the Agent Policy Groups matching the pattern.

--policy-create-translate-file file_name


Creates a Policy Definitions Translate File (see the documentation for the file format) for a previously exported policy definition.

--policy-promote-option [replace | use]


The promote option to apply when importing policy objects that have the same name as existing objects: "replace" policy objects with the same name.

 "use" existing policy objects with the same name (default).

 The force option is ignored.

--policy-translate-file file_name


Policy Definitions Translate File Name (see the documentation for the file format)

Create a formatted translate file during policy export or create a formatted file from the export zip).

--profile pattern


Exports or imports all objects associated with a BTM profile, including message formats, transaction pathway models, and activity implementations. If you specify --model, only the transaction pathway and its associated objects (activity implementations and message formats) that you specify are imported.

--promote-option option


Use if objects with the same name as those being imported already exist in the target profile. This is required if you specify --model. The possible options are rename, replace, use, and skip.

rename: Renames each object for the new profile. This preserves both the old associations and the new associations. This is the safest option.

replace: Overwrites the target objects with the objects from the source profile. If there are transaction pathways associated with the original target objects, and the transaction pathways in the two profiles differ in any way, then the associations are broken.

skip: Skips objects that are already in the target profile. Any new objects that are copied are not associated with any objects.

use: Does not overwrite any existing objects. Any new objects from the source profile are associated with objects in the target profile.

Note: If objects with the same name as the ones being imported already exist in the target profile and the model versions do not match, a message appears about the version mismatch and the model is not imported. Further, the model import disregards the –f option all together as it uses the --promote-option parameter to determine how existing objects should be handled.

--promote-translate-file filename


Identifies the file used to map host names and association IDs from the original model to the new model. This option only works when used with --model. The translation file has several stanzas. The format is the original name followed by an equals sign followed by the new name (e.g., OldName=NewName).

[Activity Description]
Activity1 Description=Activity2 Description
[Activity Implementation]
[Activity Implementation Description]
ActImpl1 Description=ActImp2 Description
[Event Template]b EventTemplate1=EventTemplate2
[History Template]b
HistoryTemplate1= HistoryTemplate2
[Host]c Host1=Host2,Host3
[Link To View Instance Path]
[Link To View Type Path]
[Message Format]
[Message Format Description]
MsgFormat1 Description= MsgFormat2 Description

[Model Description]
Model1 Description=Model2 Description
[Model Host]
[Model SLA Metric]
[Model SLA Metric Total]
[Profile Description]
Profile1 description= Profile2 description
[User]b User1=User2
[User Defined Data]
[Instrumented Application ID]
[WMB Broker MPN]
[Instrumented Application]
[Java EE Instrumented Application]
[WebSphere MQ Queue Manager]
[WebSphere MQ Application]
[WMB Broker]
[WMB Flow]

[WMB Exit Broker]
[WMB Exit Flow]



Excludes groups from being imported. Required if you do not have permission to import groups into your security environment, such as Active Directory (most users do not have this permission).



Same as --skip-groups except it excludes users instead of groups.



Imports all system startup views.

--user pattern


User Name Pattern.

--user-startupview pattern


User Pattern imports all user startup views for the specified user.

--user-tab pattern


User Tab Pattern.

--viewgroup pattern


View Group Pattern.



The promote option applies when importing a policy object that has the same name as an already existing object: "replace" the object with the same name, or "use" the existing object with the same name The force option is ignored.



Use (on import) or create (on export) the named policy translation file.

On export, a default file is generated. This default file can then be modified to define a translation scheme for imports.

On import, translation is done prior to merging the imported policy objects with any that already exist. As a result, and internal references in the imported policy objects are renamed before the merge with existing objects is done.

The translation file describes all policy objects and their translatable properties. Policy objects are defined, along with their translatable properties, using a simple JSON format.

JSON collection names map as follows:

Agent policies = roles
Agent policy groups = roleGroups
Object policies = patterns
Object policy groups = patternGroups
Expressions = expressions
Actions = actions
Schedules = schedules
Calendars = calendars

When translating an object, only its translatable properties should be modified. The original policy object name should not be changed (this allows the translation process to locate the original policy object prior to applying any translation).

For example, to rename a policy expression that was exported with the name "OriginalExprName" to have the name "NewExprName" after an import, the translate file would contain contents equivalent to this:

"expressions" : {
"OriginalExprName" : {
"expression" : "Name =~ \"KEYWORD\"",
"typeName" : "LocalQueue",
"description" : "Sample",
"name" : "NewExprName"

Note how the "OriginalExprName" is unchanged, but the name property has been modified. After an import with this translation file, the Policy Expression would be renamed to "NewExprName" (and all references to it in the imported objects would be renamed too).



Creates the named policy translate file for use with an existing export. Where an export archive already exists, but has no policy translate file, use this option to extract a default policy translation file prior to defining a translation and importing policies.



Include agent policies matching the pattern provided.



Include agent policy groups matching the pattern provided.



Give this help summary.



Run in batch mode.

Runs the command in batch mode. Without this flag you are prompted to press the Enter key (or to press Ctrl+c to cancel) before the command is processed. This flag disables that request.

-d delimiter


Qualified Name delimiter.

The delimiter command sets the character used between the two parts of a regular expression in the command. For example, --history-rule "HRW.*:.*LocalQueue.*" selects all history rules with an instance starting with HRW and a type path containing LocalQueue. The default delimiter is ":". Optional.



Force a write of the object, even if it already exists.

Force an overwrite of existing objects of the same name. Optional.

By default, the -f option does not import the default users and groups. Leaving the default groups and users avoids database problems. However, if you are sure you want to import the default users and groups, use the --overwrite-users-and-groups option.

The -f option is ignored when using --model; --promote-option is used instead.

If you are importing groups and users to a different set of services, forcing an overwrite of users or groups can cause database and security problems. Ensure that you have a full backup of the target system before you attempt an import.



Returns the help summary.



Keep going. Continue exporting or importing when a non-fatal error is encountered. Optional.



Do not write to service. Does a syntax check and tests most of the data. Check the import file for conflicts and errors, but do not actually import anything. Optional.

-p password


Password. Use this password to access the services. Cannot be used with -s. Optional.



Specify password via stdin

Read the password from a standard input. If you do not supply an input source, you are prompted for a password. Cannot be used with -p. Optional.

-t fileName [See Creating and using a translate file]


Translate File Name. Defines the translate file to be used. Object names are compared against this file and if a translation is supplied, it is applied to that object as it is imported. Only objects that are associated with a topic are in the translate file, since it is the topic path that is translated.

This file can be edited to change a large number of objects at importation. For example, you might remove a DEV prefix from objects to signify that the objects are being imported to a production environment. Optional.

    1. Defines which objects to export or import. You can use many patterns within one command. If you do not specify anything, all patterns in the file are exported or imported. If you do specify a pattern, each pattern must be followed by a regular expression enclosed in quotation marks. The regular expression creates a filter for specific objects or groups of objects to import. Optional. See Patterns.
    2. These stanzas allow the removal of the object by leaving the left side blank.
    3. The [HOST] stanza not only allows for a host to be removed by leaving the left side blank, but allows for the host to be mapped to multiple hosts by specifying a comma separated list on the left side.

Was this page helpful? Yes No Submitting... Thank you