You can export and import Central Monitoring Administration monitoring and blackout policies by using the command-driven Policy Migration Utility. This topic contains the following procedures and supporting information about importing and exporting policies:

Notes

  • The policy migration utility does not export Integration Service or cluster details of Agent configuration under the monitoring policy.

  • If the source computer has the base and extended repositories and the destination computer has only the base repository, policies created using the extended repository monitoring solutions fail to import on the destination computer.

  • The time-frame names are not case-sensitive.
    For example, if the destination computer has a time frame Tf1 and if you try to import a time frame tf1, the import fails.

Location of Policy Migration Utility command

  • Windows: <installed_location_Presentation_Server>\bin\cmapolicymigration.bat
  • Linux: <installed_location_Presentation_Server>/bin/cmapolicymigration.sh

Example:

C:\Program Files\BMC Software\TrueSightPServer\truesightpserver\bin\cmapolicymigration.bat

Command syntax

Import

cmapolicymigration.bat import -f -d inputPoliciesDirectory

cmapolicymigration.sh import -f -d inputPoliciesDirectory
Export

cmapolicymigration.bat export -p policyName -n newName -d outputDirectory

cmapolicymigration.bat export all -d outputDirectory

cmapolicymigration.sh export -p policyName -n newName -d outputDirectory

cmapolicymigration.sh export all -d outputDirectory

To export policy files

  1. On the Presentation Server host, go to the bin directory that contains the policy migration command:
    • WindowsCD /D "%TRUESIGHTPSERVER_HOME%\truesightpserver\bin"
    • Linux: cd $TRUESIGHTPSERVER_HOME/truesightpserver/bin
  2. From the bin directory, run one of the following commands:
    •  Windows:

      cmapolicymigration.bat export options attributes

    • Linux:

      cmapolicymigration.sh export options attributes

Export options and attributes

Options and
attributes 

Description

all

Exports all policies

Do not use the all and -p options together.

-d outputDirectory  

Target directory for the exported policy data files

When not specified, the current directory is assumed.

-n newName

New name for the exported policy

You cannot use this option when exporting all policies.

-p policyName

Name of the policy to be exported.

If the new policy name contains spaces, enclose it with \" \" . Do not use the all and -p options together.

Export examples

cmapolicymigration.bat export all -d "C:\Program Files\BMC Software\TrueSightPServer\truesightpserver\data\oob_policies"

cmapolicymigration.bat export –p Policy1  –n Policy2 -d "C:\Program Files\BMC Software\TrueSightPServer\truesightpserver\data\oob_policies"


 

To import policy files

  1. On the Presentation Server host, go to the bin directory that contains the policy migration command:
    • WindowsCD /D "%TRUESIGHTPSERVER_HOME%\truesightpserver\bin"
    • Linux: cd $TRUESIGHTPSERVER_HOME/truesightpserver/bin
  2. From the bin directory, run one of the following commands:
    • Windows:

      cmapolicymigration.bat import options attributes 

    • Linux:

      cmapolicymigration.sh import options attributes 

Import options

Options and
attributes 

Description

-d inputDirectory  

Location of policy data files to import

When not specified, the current directory is assumed

-f

Overwrites the current policy

Import examples

cmapolicymigration.bat import -d "C:\Program Files\BMC Software\TrueSightPServer\truesightpserver\data\oob_policies.mo"

cmapolicymigration.bat import -f -d "C:\Program Files\BMC Software\TrueSightPServer\truesightpserver\data\oob_policies.mo"

Was this page helpful? Yes No Submitting... Thank you
© Copyright 2013-2015 BMC Software, Inc.
© Copyright 2013-2015 BladeLogic, Inc.
Legal notices