Exporting the environment with the CLI

The following procedures describe how to export environment objects and settings by issuing commands:

You must specify a valid TrueSight Middleware and Transaction Monitor user id with sufficient authority and a valid password to connect to the TrueSight Middleware and Transaction Monitor servers.

You can perform mqsexport and mqsimport commands on services that are running with the clients open.

Note

You might encounter rare instance where mqsexport needs more memory allocated to it than the default settings provide. If an out of memory error is encountered during an export, raise the value for the Java -Xmx parameter in mqsexport.bat. Contact BMC Customer Support for further details.

To export an environment

  • Open a command prompt in the InstallDir and enter the following command:

    mqsexport [options] export_file userid [option_file]

To export logical instances, types, and views (Example)

  • Open a command prompt and enter the following command (modified to suit your needs):

    mqsexport -s --logical-instance ".*" --logical-type ".*" --physical-view "PRD.*" views.zip user_id

    This command reads as: Export objects from this server – Use the password from a standard input – Export the logical instances, logical types, and physical views – Export all of the objects that fall within those patterns (for the physical views, only views whose name starts with "PRD" are exported) – Export to views.zip – Using the user's user ID.
    Verify the export zip file is not a zero-size file.

To export triggers and actions (Example)

Some exported patterns might require accompanied supporting patterns in the export. For example, an exported e-mail action should be accompanied by an exported contacts list.

  • Open a command prompt and enter the following command (modified to suit your needs):

    mqsexport -p lpq.13 --event-trigger ".*" --event-action-pipeline ".*" triggers-and-actions.zip user_id

    This command reads as: Export objects from this server – Use the lpq.13 password – Export the event triggers and event action pipelines – Export all of the objects that fall within those patterns – Export to triggers-and-actions.zip – Using the user's user ID.

    Verify that the export zip file is not a zero-size file.

To export event rules (Example)

Exporting event rules preserves associations and also exports all event template associations. Some exported patterns might require accompanied supporting patterns in the export. For example, an exported event rule should be accompanied by an exported event trigger.

  • Open a command prompt and enter the following command (modified to suit your needs):

    mqsexport --event-rule "PRD.*" --event-trigger "PRD.*" --event-action-pipeline "PRD.*" event_rules.zip user_id
    This command reads as: Export objects from this server --Prompt for password – Export the event rules with action and triggers – Export only the objects that start with PRD – Export to event_rules.zip – Using the user's user ID.

    Verify that the export zip file is not a zero-size file.

To export host transaction pathway model

This example describes how to map host names and resource IDs when exporting so they can be imported into other transaction pathways. This feature can only be applied when exporting and importing at the transaction pathway level (--model modelName).

  1. Run mqsexport to create the following:

    mqsexport example


    mqsexport -p <password> --profile Profile0 --model Model0 --promote-translate-file promote-translate-file.txt new_model.zip SA

    This command reads as: Export objects from this server using the SA password – From the profile Profile0 – Export the transaction pathway Model0 – Create promote translate file promote-translate-file.txt – Export to new_model.zip – Using the SA user ID.

    Unmodified promote translate file: promote-translate-file.txt

    [Group]
    BTM Administrators=BTM Administrators
    [Host]
    Host1=Host1
    Host2=Host2
    [Profile]

    Profile1=Profile1
    [WebSphere MQ Application]

    App=App
    [WebSphere MQ Queue]

    inQ=inQ
    outQ=outQ
    [WebSphere MQ Queue Manager]

    USA=USA
  2. In a text editor, modify the translation files by changing the values on the right side of the equations to match the new profile name, resource IDs or host names. If you would like to promote the exported models to a different profile, change the profile name on the left side.

    Modified promote translate file: promote-transalate-file.txt


    [Group]
    BTM Administrators=BTM Administrators
    [Host]
    Host1=HostA
    Host2=HostB
    [Profile]

    Profile1=Profile2
    [WebSphere MQ Application]

    App=MyApp
    [WebSphere MQ Queue]

    inQ=inQ0
    outQ=outQ0
    [WebSphere MQ Queue Manager]

    USA=CANADA
Was this page helpful? Yes No Submitting... Thank you

Comments