Note: This module supports Sitecore 8.1+ as a target. Source versions have been tested from Sitecore 6.6.
The Sitecore Field Migrator allows migration of item field content from one instance of Sitecore to another. Only the items and field values specified are actually copied. Currently, the Field Migrator only supports moving Content and Media Items, along with their fields values. The primary use of this migrator is to move data from one version of Sitecore to another without the need to upgrade. Using this tool makes the most sense when a Sitecore site is being redesigned and rebuilt on a newer version of Sitecore. In this case, only the content is to be copied. Layouts and other data will be different in the new site and does not need to be migrated.
The migrator runs in the context of the target site. Data is pulled from the source site using the Hard Rocks Web Service provided by Sitecore Rocks. All steps in the process can be customized without impacting other steps.
Here are the key features of the Field Migrator:
- Migrates item field data from one Sitecore instance to another.
- Uses the Hard Rock Web Service from Sitecore Rocks on the source instance.
- Based on pipelines for easy logic replacement.
- Re-runable. The migration can be run over and over to migrate live production data to the new site.
- Configuration-driven.
- Migration can be triggered via web page or API call.
- Items
- Configure the root node(s) to migrate. All children are migrated.
- Configure the items based on templates to include/exclude when migrating.
- All children of a parent based on a template type can automatically be included.
- Configure media items based on templates to automatically migrate. (Media is automatically discovered and migrated.)
- Can re-map Item IDs.
- Can re-map Template IDs.
- Can re-map Parent IDs.
- Items can be automatically created if missing.
- Items are automatically updated based on fields from source system.
- Versions
- Can re-map languages.
- Out-of-the-box, the latest approved version is migrated.
- Fields
- Ability to skip fields.
- Automatically skips standard fields with configurable exceptions.
- Can re-map fields.
- Automatically detects media references to import media.
Here is a typical data flow through the pipelines. The pipeline steps can be added, removed and replaced.
Components need to be installed on both the Source and Target Sitecore instances.
The Hard Rocks web service needs to be installed on the source instance of Sitecore. One way to install it is to perform the following steps:
- Install Sitecore Rocks into Visual Studio.
- Setup Sitecore Rocks to point to the Source instance of Sitecore.
- Configure it to use the Hard Rocks web service.
There are a few approaches for installation on the target system:
- Install the update package using the Update Installation Wizard.
- Pull down the source code and update the TDS.Master project to point to the target Sitecore Instance. Build the project to deploy it.
- Pull down the source code and compile.
- Copy the resulting OneNorth.FieldMigrator.dll to your Sitecore instance.
- Copy the App_Config/Include/z.OneNorth.FieldMigrator.config to your Sitecore instance.
Note: you may want to create a branch / fork of this project to store any customizations.
The Field Migrator migrates field data based on what has been configured. The configuration must be updated to support the data requirements.
The configuration is located in the App_Config/Include/z.OneNorth.FieldMigrator.config It can be broken down into a few parts. The configuration is organized from more general stuff at the top to more specific at the bottom.
- fieldmigrator - Holds common general configuration such as source and target system info, the roots to migrate, and the templates to include.
- migrateItem pipeline - Holds the pipeline steps that manage migrating at the item level.
- createItem pipeline - In charge of creating items when they don't exist in the target instance.
- migrateVersion pipeline - Holds the pipeline steps that manage migrating at the version level.
- migrateField pipeline - Holds the pipeline steps that manage migrating at the field level.
- database/events - There are various settings to improve the performance of the field migrator. These are meant to be temporary and should be removed when not running a migration.
Here is a link to the configuration file that is provided out of the box. The various settings are commented directly in the configuration file.
The migrator can be run by navigating to: /sitecore/admin/FieldMigrator/Default.aspx. Click the Run Field Migrator button.
Note: there is no progress indicator. You can check the Sitecore logs for an indication of progress. BareTale provides a way to monitor logs in real time.
You may need to perform the following steps after running the migrator:
- Publish the items that were migrated
- Rebuild indexes.
The associated code is released under the terms of the MIT license.