Migrating software classification

9.2.40 Available from 9.2.40.

If you are migrating between two instances of License Metric Tool and the new instance cannot use the same database as the old instance used, follow this procedure to ensure that software classification from the old instance is recreated in the new instance.

About this task

The following items are not migrated:
  • Shared components
  • Tags added to software instances

Procedure

  1. Export software classification from the first instance of License Metric Tool.
    • If this instance of License Metric Tool is in application update 9.2.40 or higher, perform the following steps.
      1. In the top navigation, hover over Reports, and click Software Classification.
      2. Hover over Configure, and click Configure View.
        • To export all classification data, clear all filters from the report, including the ones that are specified by default.
        • To export only a subset of data, apply appropriate filters to the report.
      3. Hover over Export, and click Data for Migration. A CSV file is saved to your computer.
    • If this instance of License Metric Tool is between application update 9.2.26 and 9.2.39, perform the following steps. If this instance is in earlier application update, the procedure is not supported.
      Important: In this case, manual adjustment of the file with software classification data is required. It is a complex task because a JSON file that you obtain must be edited to meet certain requirements and saved as a CSV file. If possible, upgrade the first instance of License Metric Tool to application update 9.2.40 or higher.
      1. To export software classifications from the first instance of License Metric Tool to a JSON file, use the following cURL command.
        curl -X GET -k -H "Token: token" -H "Accept: application/json" 
        "https://server_url:server_port/api/sam/v2/software_instances?columns[]=computer_name
        &columns[]=computer_ip_address&columns[]=discoverable_guid&columns[]=discovery_path&columns[]=product_release_guid&columns[]=metric_id
        &columns[]=is_charged&columns[]=bundle_guid&columns[]=is_suppressed&columns[]=is_confirmed&columns[]=is_excluded
        &columns[]=exclusion_or_suppress_comment" -o file_name.json
        Where:
        token
        Specifies the token that is used to authenticate REST API requests. For information how to obtain the token, see: Authenticating REST API requests.
        server_url
        The server address where the first instance of License Metric Tool is hosted.
        server_port
        The port number on which the firstinstance of License Metric Tool service is running.
        file_name
        Name of the JSON file to which you want to save the response.
      2. The format and content of the CSV file that can be imported to the second instance of License Metric Tool is predefined. The output file that you obtain by using REST API needs to be updated to match the predefined format. Open the JSON file, and make the following changes.
        1. Edit headers so that they have proper names. Edit the headers according to the following table.
          Table 1. Relation between entries returned by REST API and columns in the CSV file
          Header returned by REST API Header that should be in the CSV file
          computer_name computer.name
          computer_ip_address computer.ip_address
          discoverable_guid catalog_dimension.guid
          discovery_path path.path
          product_release_guid software_title_release.guid
          metric_id metric_id
          is_charged comp_to_release_charged
          bundle_guid product_bundle.guid
          is_suppressed is_suppressed
          is_confirmed is_confirmed
          is_excluded is_excluded
          exclusion_or_suppress_comment exclusion_comment
        2. Save the file into the CSV format.
  2. Optional: If the CSV file with migration data is larger than 10MB, split it into multiple files. Ensure that headers in the smaller files are the same as in the original file with the exported data.
  3. Import software classification to the second instance of License Metric Tool.
    1. In the top navigation, hover over Reports, and click Software Classification.
    2. Hover over Classify, and click Migration Data.
    3. Attach the CSV file, and click Import. After the import finishes a summary page is displayed.

Results

Migration of data might take a considerable amount of time (between one and two minutes for every 1000 of migrated records). After the import finishes, a summary page is displayed to help you verify its completeness, and take corrective actions if needed. The page provides the following information:
  • Number of records that were successfully imported.
  • Number of records that were skipped (for example because they represented shared components).
  • Any parsing or format-related errors encountered during the import.