Importing the environment with the CLI


Before you begin

If necessary, install the services in the destination environment.

To import an environment

  1. Open a command prompt in the InstallDir.
  2. Enter:

    mqsimport [options] import_file userid [option_file]

    See Export and import command options for descriptions of all available import options.
  3. Restart the Monitor Console when the import is complete.

To import logical instances, types, and views

  • Open a command prompt and enter the following command (modified to suit your own needs as per the example in "To export logical instances, types, and views (Example)" in Exporting the environment):

    mqsimport -k -f -t ourenvironment.txt views.zip user_id

    See Export and import command options for descriptions of all available import options.

    This command translates as: Import objects to this server – Ignore errors and keep processing – Overwrite objects with the same name – Use the ourenvironment.txt file to change the pattern names – Import from views.zip – Using the user's user ID.

    Verify that the imported views are present by opening the Monitor Console.

To import triggers and actions

  • Open a command prompt and enter the following command (modified to suit your needs as per the example in To export triggers and actions (Example) in Exporting the environment):

    mqsimport -p geq.12 triggers-and-actions.zip user_id

    See Export and import command options for descriptions of all available import options.

    This command translates as: Import objects to this server – Stop for errors (there is no -k flag) – Do not overwrite objects with the same name (there is no -f flag) – Use the geq.12 password – Do not use a translate file (no -t flag) – Import from triggers-and-actions.zip – Using the user's user ID.

    Verify that the imported views are present by opening the Monitor Console.

To import event rules

  • Open a command prompt and enter the following command (modified to suit your needs To export event rules (Example) in Exporting the environment):

    mqsimport -f event_rules.zip user_id

    See Export and import command options for descriptions of all available import options.

    This translates as: Import objects from this server – Prompt for password – Stop for errors (there is no -k flag) – Overwrite objects with the same name – Do not use a translate file (no -t flag) – Import from event_rules.zip – Using the user's user ID

    Verify that the imported views are present by opening the Monitor Console.

To import parts of an environment (Example)

You can specify objects to import to the exclusion of other objects in the environment.

  • The following imports Event-related material starting with PRD even though the file contains other objects.

    mqsimport --event-rule "PRD.*" --event_trigger "PRD.*" --event_action_pipeline "PRD.*" complete_mqsexport.zip user_id
  • If you plan to import users and groups, groups must be imported first.

To import host transaction pathway model

See, "To export host transaction pathway mode"l in Exporting the environment.

  1. Run mqsimport specifying the translation files. By specifying the translation files for the host names and resource IDs, all host names and resource IDs that match those on the left side of the equations are automatically changed to names and IDs on the right side on import.

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

     

    Note

    When a -model pattern is defined on mqsimport, you must also add --profile, --promote-profile, and --promote-option patterns. Because a transaction pathway with the same name can appear in several profiles, the above additions prevent an overwrite of existing transaction pathways.

     

    See Export and import command options for descriptions of all available import options.

    This command translates as: Import objects from this server using the SA password – From Profile0 – Import the transaction pathway, Model0 – Into the profile PromoteProfile – Overwrite the profile – With the mapping from the hostpromote translate file, promote-translate-file.txt – Import from new_model.zip – Using the SA user ID. 

  2. (Recommendation) Restart your clients when the import process is finished.

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*