In this blog i will detail on using Configuration Migration/ Data Migration utility. This can be used to move the configuration data from one CRM environment to other. generally Configuration data is used to defines custom functionality in CRM, which is typically stored in custom entities.
Often we need to migrate configuration data from one CRM environment to other, especially test data, master data setup etc. Microsoft provided an excellent tool for doing this.
Following are the benefits of using this tool,
- allows you to select entity and fields from where you want to export the configuration data.
- large amount of data from multiple entities can be moved from one crm environment to other.
- Data can be imported using the same GUID’s as that of the source system, hence lookup references to imported records will be valid.
- Schema file can be reused to export data from different source environments.
Below are the main steps to use this tool,
- Create schema file.
- export the data from source CRM environment.
- import the data into target CRM environment.
It is important that both source and target environments must have same configuration for the entities and fields that are selected in schema file.
Create schema file
- Open DataMigrationUtility from Configuration Migration folder. If you need to download Configuration migration tool, please use this link.
- Click on “Create Schema” and Continue. This will take you to the login screen. enter the login details to connect to your CRM environment.
3. You will be presented with below screen, where you can select the solution which contains your customization. Select your solution and select the entity you want to add. Add fields: this will add the selected fields of the entity into schema. Add entity: this will add all fields from the entity along with N:N relationships. Add All: this will add all entities , their fields and N:N relationships. Clear Selection: this will remove all selected entities/fields from the selection. After you have selected entities/fields, hit”Save and export” button. That will ask you to specify the path and name for the schema file it is going to generate.
4. Once you provide the file path, tool will save the schema file and ask the if “you would like to export the data”. If you says, YES then you have to choose a location to save the data file as shown below.
5. Hit “Export Data” to export data as per the schema you have created. You can see the export status, no of records exported in the status text area.
6. If you open the ZIP file (data.zip) that was created after export, it will have data(data.xml) file as well as schema(data_schema.xml) file.
Export data: If you already have a schema file and want to export data from source CRM environment, follow below steps,
- From the DataMigrationUtility, select “export data” and hit “Continue” button. This will take you to the login screen. Enter the connection details of source CRM environment from where you want to export data.
- Once login is successful, you will be presented with below screen, where you need to select the schema file and target location to save your data file. Then click “Export data”.
3. Once the export is completed, you can see data.zip file in the location you have selected.
Import Data: Once you have the data file with you, follow below steps to import data into target CRM environment
- Select “Import data” option from the DataMigrationUtility and hit “Continue” button. This will take you to the login screen where you need to enter target CRM environment details.
2. Select the data file (data.zip) that need to be imported, hit “Import Data” button. You can view the import status directly on the tool, as shown below.
This will import the record into the target environment.
- How the tool identifies weather to create or update a record in target?
by default, tool will look at name field of the entity to identify weather to create/update the record. We can set the schema file in such a way that the tool will look for a different field to identify create/update scenario. Once we added the entity/fields while creating the schema file, click on Tools –> Configure Import Settings
on the new window, select the field on the left side and click “Add field” and save. In my case, i am going to select the primaryGUID field of the entity.
2. How to disable plugins when importing data ?
While creating schema, navigate to Tools –> Configure Import Settings, you will see option to disable plugin for the current entity or all entities for import as shown below,
3. Where to look for logs?
Navigate to Logs menu on the DataMigrationUtility which will give you running logs if any import is in progress or last imported logs.
Hope this is helpful!