Comparing two directories

This topic was edited by a BMC Contributor and has not been approved.  More information.

Contributor content

This topic was created by a BMC Contributor and has not been approved. More information.

This page describes how to compare two directories using BMC Server Automation. In the example presented here, the directory comparison is performed on dir_1 and dir_2, both in /tmp and on the same server.

To enlarge figures, click the thumbnails.

To compare two directories

  1. To create a new template, click a component template folder and select New > Component Template.
  2. Specify a name for the template and click Finish.
    Do not choose any parts or enter any other input.
  3. Open the template for editing.
  4. Through the Local Properties tab, perform the following steps:
    1. Click the green + icon to add a new local property. Name it MYPATH, and click OK.
    2. On the Instances tab, click the green + icon and two new property instances. In this example, one instance is for dir_1 and the other is for dir_2. In each new instance, set the value of the MYPATH property as appropriate, to reflect the local path to the application.


      When you are done, you should have 2 instances listed:
  5. On the Parts tab of the template, click the green + icon and add a new part of the local property MYPATH, as shown in the following figures.



  6. On the Discover tab of the template set your discovery conditions. In this example, we want to check that MYPATH exists on the server.
  7. Save and close the template.
  8. Create a new discovery job for this template. Run it against all the servers on which you need to discover the defined condition.


    When the discovery job finishes running, you should have discovered the instances of the template on your server(s). In this example, both directories are on the same server, so you would have 2 instances of the template (2 components) on 1 server. In other scenarios, you may have 1 instance on each server.
  9. To compare the results of the discovery, create and run a new audit job based on components.

    As you step through the Audit Job wizard, perform the following actions:
    1. For the template choose the component template that you created in Step 1.
    2. For the master, choose the master component that you want to compare against.
    3. For the targets, choose the other components that were discovered.

      In this example, the master component instance of dir_1 from the blapp server is compared against an instance of dir_2 on blapp and against instances of this component on red1 and red2.
  10. After running the Audit Job, view your audit results.
Was this page helpful? Yes No Submitting... Thank you

Comments