> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/reference/copystorm-medic/lineage-maintenance.md).

# Lineage Maintenance

The CopyStorm/Medic Lineage Maintenance Tool is used to view lineage data & invalidate problematic lineage records.

Over time, a Record’s lineage may be invalidated:

* One of the legacy lineage entries may no longer exist in the CopyStorm Database or Snapshot.
* Records may have multiple children, causing split lineage.

For more details on Record Lineage, [refer to this article](https://learn.capstorm.com/copystorm-restore/readme/frequently-asked-questions/how-does-record-lineage-work).

## Using the Tool

* Select “Other Tools” from the top-level menu.
* Select “Data Synchronization” and then “Lineage Maintenance”

![](https://4057376488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsbSqfKw3vSfr8qwXao4j%2Fuploads%2Fgit-blob-99f490fce4e89f1c0762aaae3ba4d20926483b43%2F96114b94-LineageMaintenance_SelectTool.png?alt=media)

* Optionally Configure Modified After & Modified Before
  * This will control what date ranges are queried for lineage.
  * Leaving these values Blank will query all time lineage.
* Optionally Enable Validators
  * Purged Record Validation
    * Identifies lineage entries that do not have a corresponding physical record in the CopyStorm Database or Snapshot.
  * Branching Lineage Validation
    * Identifies lineage entries that have multiple children.
* Optionally toggle “Only Show Invalid Lineages” checkbox
  * This should be used when investigating invalid lineages.
* Click “Start Scan”

![](https://4057376488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsbSqfKw3vSfr8qwXao4j%2Fuploads%2Fgit-blob-cfb9419d96daea6ec224d2faa9909adb6e54d1a1%2F96649243-LineageMaintenance_1stScreen-1.png?alt=media)

After clicking “Start Scan”, the application will render a view of:

* All Lineage within the provided Modified After / Modified Before values.
* The Status of each Lineage.
  * Valid
    * If there are no branches and all lineage entries exist in the CopyStorm Database or Snapshot
  * Invalid
    * If branch(es) are detected or any entry is missing from the CopyStorm Database or Snapshot
* The associated Salesforce Table for the Lineage.
* The Salesforce ID of the Lineage HEAD
  * HEAD is the most recent entry in the Lineage.

Use the “Invalidate Selected Lineage” to mark problematic Lineage Entries as Invalid in the database.

**Note: Invalidating Lineage will prevent CopyStorm/Restore from considering invalid entries as recovery candidates.**

![](https://4057376488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsbSqfKw3vSfr8qwXao4j%2Fuploads%2Fgit-blob-7128d410e53ec9335e65def09495df22e3723f05%2Fcbaafb44-LineageMaintenance_2ndScreen.png?alt=media)

**An example of viewing a full lineage is shown below:**

![](https://4057376488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsbSqfKw3vSfr8qwXao4j%2Fuploads%2Fgit-blob-fd1472fcd63cd53e308423efe846c78a2e052ae0%2F0ec69010-LineageMaintenance_3rdScreen.png?alt=media)
