# Delta Migration Guide

This guide aims to give a general understanding of how a **Delta Migration** works in the context of migration-center

Most migration-center adapters offer the possibility of doing a **Delta Migration**. For more adapter specific information please consult the documentation for the adapter you are using.

## Duplicates, updates and new versions

### Migration-center does not scan duplicates

Any document or object scanned in migration-center is considered unique based on its **Id\_in\_source\_system** value. Therefore scanning the same document multiple times will result in subsequent scan runs ignoring the document to avoid creating duplicates.&#x20;

Set the **loggingLevel** parameter to **4** to see each ignored document in the scan run log.&#x20;

{% hint style="info" %}
Each version of a document is considered a unique object in migration-center with its own **Id\_in\_source\_system** value. Therefore new versions are not considered duplicates.
{% endhint %}

### Scanning Updates

If you scan a document and then **that document is changed** in the source system, scanning the document again will result in an **Update Object.**

An Update Object has the same **Id\_in\_source\_system** as the **Original Object** but the **Is\_update** flag set to **true**.

### Importing Updates

When you import an update object, the importer will get the **Id\_in\_target\_system** of the **Original Object**, locate it in the target system and **update** the content and/or metadata. \
Therefore you must import the **original object** **before importing the update**.

{% hint style="danger" %}
**Do not reset or delete** any migset containing imported original objects. This will reset its status and delete the Id\_in\_target\_system value, making it impossible for the importer to locate the imported object in the target system.\
**Always use a copy of the migset** if you need to use the same configuration.
{% endhint %}

{% hint style="success" %}
If the Original Object was not previously imported, you can import both the original and update objects **in the same import run**.&#x20;
{% endhint %}

### New Versions

**New versions** to already scanned documents are **not** considered update objects and are scanned as new objects linked to the existing ones using the **previous\_version\_object\_id** attribute.

To import any version, other than the root version of a document, requires its parent version to also be imported. If this was done in a previous run, then **do not reset or delete** the original migset containing the parent versions. Create a copy of the migset if you need to use the same configuration.

If the parent versions were not imported before you can import all versions together in the same import  run.

## Delta Migration Process

#### Initial Migration

An initial migration is done by scanning most or all of the objects from your source system, transforming them and importing to your target system.

Since you can keep the source system active through the initial migration, new documents, new versions and updates can be created after your initial scan was finished.&#x20;

You can then perform one or multiple delta migrations, which will capture only the new documents and changes.

### Delta Scan

You can run the same scanners as during the initial migration or use new ones that go over the same data. These scan runs will contain:&#x20;

* New Objects (have no special requirements and will be imported as usual)&#x20;
* [Update Objects](#scanning-updates)
* [New Versions](#new-versions)

### Transformation and Association

You can use **new migsets or copies** of the migsets used in the initial migration to transform the objects from the delta scan. This will ensure the migsets from the initial migration are not reset or deleted.

{% hint style="warning" %}
Please see your importer's documentation for any requirements, restrictions and behavior specific to that importer.&#x20;
{% endhint %}

### Delta Import

During the delta Import you will import the previously scanned new objects, update objects and new versions.&#x20;
