Copying CIs from one dataset to another
As a configuration manager you use the Copy activity to copy instances from one dataset to another. You can use this activity to create datasets such as baselines and snapshots. To copy instances from one dataset to another, you must first create a reconciliation job.
Best practice
We recommend creating an Atrium Integrator job to copy data from one dataset to another. If you want to copy identified CIs, you can also use a Merge activity.
Copy activity uses Graph API to traverse in both the directions for each connected CI to copy the data. Hence, it is a slow process compared to Merge activity or an Atrium Integrator job which does not use Graph API to copy data.
Additionally, Copy activity might create duplicate data unlike Merge activity or Atrium Integrator job.
Example
Calbro services wants to make changes to the CIs in BMC.ADDM dataset to run some tests. Instead of making changes to the production dataset directly, they want to copy the CIs to a test dataset and then run the tests. They choose to copy all those CIs in which 'Model' = $\NULL$ AND 'MarketVersion' != "1.2.3" from BMC.ADDM dataset into a new dataset.
Before you begin
- Create a qualification ruleset if you want to copy specific instances to the target dataset. For creating a qualification ruleset, see Creating qualification rules for reconciliation activities.
- Create a dataset into which the data from the source dataset is copied. To create a dataset, see Creating and editing a dataset.
To copy CIs from one dataset to another
On the Dashboard, open Jobs > Manage Reconciliation.
To add the Copy activity in a new job, click Create Job.
See Creating a reconciliation job.- To add the Copy activity to an existing job, on the reconciliation dashboard, select an existing reconciliation job from All Job Run Activities and then click Edit Job.
Create a Copy activity in the reconciliation job.
In the Activities area, click Add activity and select Copy from the list.
Enter the following information
Field Description Name
Type a unique name for the activity. The name must contain only those characters that the operating system of your server allows for file names. For example, on a Windows server, your job name cannot contain the following characters: \ / : * ? " < > |.
Namespace
Select a Namespace from the list. Only classes in the selected namespaces can participate in the activity. For more information, see Namespaces and reconciliation.
Status
Active - Runs the activity when the reconciliation job runs.
Inactive - Does not run the activity when the reconciliation job runs.
Continue on Error
Defines whether the job continues if the activity has an error.
Selected - The job continues to run even if an error occurs in this activity.
Cleared - The job is terminated if an error occurs in this activity.Sequence
Specify the sequence value for this activity in relation to other activities in a job. For example, if this activity has a sequence value of 2, it runs before an activity with a sequence value of 3. The sequence can be from 0 to 1000.
Select Source Dataset and Target Dataset.
Set the option combination for the Copy activity by using the information in the following table.
For possible combinations of the options available in a Copy activity, see Option combinations for Copy activity.Option Description Copy Relationships Determines whether to restore direct relationships to instances in the target dataset. For example, when a copied CI is a member of a relationship in the source dataset, and another member of the same relationship already exists in the target dataset without the relationship, the relationship instance is copied to restore the connection between those CIs in the target dataset. The other member of that relationship is not copied. - By Qualifier — Copies only the relationships included in the Qualification Set.
- Copy All — Copies relationships included in the Qualification Set, and also restore direct relationships to instances in the target dataset.
Collision Resolution Determines the action when there are matching instances in the source and target databases. - Overwrite - Replaces the existing instance in the target dataset with the instance from the source dataset.
- Display Error - Writes an error message to the activity log file and not copy the instance.
Include Child CIs Select whether to copy weak destination CIs. - Select - Copies only the CIs included in the Qualification Set.
- Clear - Copies CIs included in the Qualification Set, the weak relationships, and the CIs related as destination members in the weak relationships. This option preserves composite objects.
Identity Required Select whether to copy instances with or without a reconciliation identity. - Select - Copies only identified instances.
- Clear - Copies identified and unidentified instances.
(Optional) In Qualification, add a qualification set to select the classes and instances to copy.
Clear Use all classes and instances to restrict the Copy activity by using a qualification set.
Click Select qualification rulesest to select a qualification set.
In the Schedule area, select the frequency and condition to run the job.
- Click Save to save the reconciliation job with the Copy activity.
(Optional) To run the job immediately, open the job from All Job Run Activities and click Start Job.
Option combinations for Copy activity
The following table describes the behavior of the Copy activity for each combination of options. Use the table filters to specify the options that you want to set to know the result of that combination.
Copy Relationships | Collision Resolution | Include Child CIs | Identity Required | Behavior |
---|---|---|---|---|
By Qualifier | Overwrite | No | Yes | Only instances with a reconciliation identity are copied, and they replace existing instances. Only CIs and relationships specified in Qualification are copied. |
Copy All | Overwrite | No | Yes | Only instances with a reconciliation identity are copied. They replace existing instances in the target dataset. Relationships of copied CIs, where another member of the relationship exists in the target dataset, are also copied. |
By Qualifier | Display Error | No | Yes | Only instances with a reconciliation identity are copied. If they match existing instances in the target dataset, an error is written to the activity log. Only CIs and relationships specified in Qualification are copied. |
Copy All | Display Error | No | Yes | Only instances with a reconciliation identity are copied. If they match existing instances in the target dataset, an error is written to the activity log. Relationships of copied CIs, where the other member of the relationship exists in the target dataset, are also copied. |
By Qualifier | Overwrite | Yes | Yes | Only instances with a reconciliation identity are copied. They replace existing instances. In addition to instances specified in Qualification, all weak relationships and CIs under them are also copied. |
Copy All | Overwrite | Yes | Yes | Only instances with a reconciliation identity are copied. They replace existing instances. In addition to instances specified in Qualification, all weak relationships and their child CIs are also copied. Relationships of copied CIs, where the other member of the relationship exists in the target dataset, are also copied. |
By Qualifier | Display Error | Yes | Yes | Only instances with a reconciliation identity are copied. If they match existing instances in the target dataset, an error is written to the activity log. In addition to instances specified in Qualification, all weak relationships and CIs below them are also copied. |
Copy All | Display Error | Yes | Yes | Only instances with a reconciliation identity are copied. If they match existing instances in the target dataset, an error is written to the activity log. In addition to instances specified in Qualification, all weak relationships and CIs below them are also copied. Relationships of copied CIs, where the other member of the relationship exists in the target dataset, are also copied. |
By Qualifier | Overwrite | No | No | Instances with and without a reconciliation identity are copied. They replace existing instances. Only instances specified in Qualification are copied. |
Copy All | Overwrite | No | No | Instances with and without a reconciliation identity are copied. They replace existing instances. Relationships of copied CIs, where the other member of the relationship exists in the target dataset, are also copied. |
By Qualifier | Display Error | No | No | Instances with and without a reconciliation identity are copied. If they match existing instances in the target dataset, an error is written to the activity log. Only instances specified in Qualification are copied. |
Copy All | Display Error | No | No | Instances with and without a reconciliation identity are copied. If they match existing instances in the target dataset, an error is written to the activity log. Relationships of copied CIs, where the other member of the relationship exists in the target dataset, are also copied. |
By Qualifier | Overwrite | Yes | No | Instances with and without a reconciliation identity are copied. They replace existing instances. In addition to instances specified in Qualification, all weak relationships and CIs below them are also copied. |
Copy All | Overwrite | Yes | No | Instances with and without a reconciliation identity are copied. They replace existing instances. In addition to instances specified in Qualification, all weak relationships and CIs below them are also copied. Relationships of copied CIs, where the other member of the relationship exists in the target dataset, are also copied. |
By Qualifier | Display Error | Yes | No | Instances with and without a reconciliation identity are copied. If they match existing instances in the target dataset, an error is written to the activity log. In addition to instances specified in Qualification, all weak relationships and CIs below them are also copied. |
Copy All | Display Error | Yes | No | Instances with and without a reconciliation identity are copied. If they match existing instances in the target dataset, an error is written to the activity log. In addition to instances specified in Qualification, all weak relationships and CIs below them are also copied. Relationships of copied CIs, where the other member of the relationship exists in the target dataset, are also copied. |
The following video (3:00) shows an example for a copy activity and the steps required to create a copy activity in a reconciliation job:
Comments
Log in or register to comment.