Magento 2 Migration Tool - Verify if Migration is successful from 1.9 - 2.0 CE
-
28-09-2020 - |
Question
mage2\vendor\magento\data-migration-tool\etc
mage2\vendor\magento\data-migration-tool\etc\ce-to-ce
mage2\vendor\magento\data-migration-tool\etc\ce-to-ce\1.9.2.2
mage2\vendor\magento\data-migration-tool\etc\ce-to-ce\1.9.2.2\config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="../../config.xsd">
<source version="1.9.2.2">
<database host="localhost" name="magento9" user="root"/>
</source>
<destination version="2.0.2">
<database host="localhost" name="mage2" user="root"/>
</destination>
<steps mode="settings">
<step title="Settings Step">
<integrity>Migration\Step\Settings\Integrity</integrity>
<data>Migration\Step\Settings\Data</data>
</step>
<step title="Stores Step">
<integrity>Migration\Step\Stores\Integrity</integrity>
<data>Migration\Step\Stores\Data</data>
<volume>Migration\Step\Stores\Volume</volume>
</step>
</steps>
<steps mode="data">
<step title="EAV Step">
<integrity>Migration\Step\Eav\Integrity</integrity>
<data>Migration\Step\Eav\Data</data>
<volume>Migration\Step\Eav\Volume</volume>
</step>
<step title="Customer Attributes Step">
<integrity>Migration\Step\Customer\Integrity</integrity>
<data>Migration\Step\Customer\Data</data>
<volume>Migration\Step\Customer\Volume</volume>
</step>
<step title="Map Step">
<integrity>Migration\Step\Map\Integrity</integrity>
<data>Migration\Step\Map\Data</data>
<volume>Migration\Step\Map\Volume</volume>
</step>
<step title="Url Rewrite Step">
<integrity>Migration\Step\UrlRewrite\Version191to2000</integrity>
<data>Migration\Step\UrlRewrite\Version191to2000</data>
<volume>Migration\Step\UrlRewrite\Version191to2000</volume>
</step>
<step title="Log Step">
<integrity>Migration\Step\Log\Integrity</integrity>
<data>Migration\Step\Log\Data</data>
<volume>Migration\Step\Log\Volume</volume>
</step>
<step title="Ratings Step">
<integrity>Migration\Step\Ratings\Integrity</integrity>
<data>Migration\Step\Ratings\Data</data>
<volume>Migration\Step\Ratings\Volume</volume>
</step>
<step title="ConfigurablePrices step">
<integrity>Migration\Step\ConfigurablePrices\Integrity</integrity>
<data>Migration\Step\ConfigurablePrices\Data</data>
<volume>Migration\Step\ConfigurablePrices\Volume</volume>
</step>
<step title="OrderGrids Step">
<integrity>Migration\Step\OrderGrids\Integrity</integrity>
<data>Migration\Step\OrderGrids\Data</data>
<volume>Migration\Step\OrderGrids\Volume</volume>
</step>
<step title="Tier Price Step">
<integrity>Migration\Step\TierPrice\Integrity</integrity>
<data>Migration\Step\TierPrice\Data</data>
<volume>Migration\Step\TierPrice\Volume</volume>
</step>
<step title="SalesIncrement Step">
<integrity>Migration\Step\SalesIncrement\Integrity</integrity>
<data>Migration\Step\SalesIncrement\Data</data>
<volume>Migration\Step\SalesIncrement\Volume</volume>
</step>
</steps>
<options>
<crypt>
<key>1bc968bd50b96ee18388feaed3bc1f1d</key>
</crypt>
<map_file>etc/ce-to-ce/1.9.2.2/map.xml</map_file>
<eav_map_file>etc/ce-to-ce/1.9.2.2/map-eav.xml</eav_map_file>
<eav_document_groups_file>etc/ce-to-ce/1.9.2.2/eav-document-groups.xml</eav_document_groups_file>
<eav_attribute_groups_file>etc/ce-to-ce/1.9.2.2/eav-attribute-groups.xml</eav_attribute_groups_file>
<log_map_file>etc/ce-to-ce/1.9.2.2/map-log.xml</log_map_file>
<log_document_groups_file>etc/ce-to-ce/1.9.2.2/log-document-groups.xml</log_document_groups_file>
<settings_map_file>etc/ce-to-ce/1.9.2.2/settings.xml</settings_map_file>
<customer_map_file>etc/ce-to-ce/1.9.2.2/map-customer.xml</customer_map_file>
<customer_document_groups_file>etc/ce-to-ce/1.9.2.2/customer-document-groups.xml</customer_document_groups_file>
<customer_attribute_groups_file>etc/ce-to-ce/1.9.2.2/customer-attribute-groups.xml</customer_attribute_groups_file>
<order_grids_document_groups_file>etc/ce-to-ce/1.9.2.2/order-grids-document-groups.xml</order_grids_document_groups_file>
<class_map>etc/ce-to-ce/1.9.2.2/class-map.xml</class_map>
<!--
In case bulk_size=0 it will be auto-detected for every document.
-->
<bulk_size>0</bulk_size>
<!--
Set direct_document_copy = 1 for better performance.
NOTE: 'source' and 'destination' databases MUST be placed on the same MySQL instance
and 'destination' user MUST be granted with 'SELECT' permissions on 'source' database
-->
<direct_document_copy>0</direct_document_copy>
<source_prefix />
<dest_prefix />
<auto_resolve_urlrewrite_duplicates>0</auto_resolve_urlrewrite_duplicates>
<log_file>migration.log</log_file>
<progress_bar_format>%percent%% [%bar%] Remaining Time: %remaining%</progress_bar_format>
<upgrade_customer_password_hash>1</upgrade_customer_password_hash>
</options>
</config>
settings.xml
is copied from path mage2\vendor\magento\data-migration-tool\etc\ce-to-ce
Added settings.xml.dist and map.xml.dist at location mage2\vendor\magento\data-migration-tool\etc
In CMD prompt I am executing below commands for settings
and data
migration respectively
php bin/magento migrate:settings vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/config.xml
php bin/magento migrate:data vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/config.xml
and it says Migration Compelted
.
After flushing cache and reindexing, I do not see any changes in my Mage 2.0 installation. Its the same.
To use the mapping files:
1. Rename or copy them to remove the .dist extension.
2. Edit them using the schema located in <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc.
3. Then change config.xml in <options> node with the new name of the file.
- How can I verify if settings and data are migrated successfully ?
- Have I made any mistake in Configuring the migration OR Configuration and mapping files ?
Reference URL - http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html
Solution
try below solutions, with file name,
magento2/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.1/map.xml
you have to keep below tag inside <source><document_rules>
<ignore>
<field>customer_eav_attribute.is_used_for_customer_segment</field>
</ignore>
OTHER TIPS
Elaborating on the accepted answer with some additions.
For every custom attribute or table you get an integrity check error like yours, you need to (or can) define an ignore rule.
They are defined for <source>
and <destination>
on <document_rules>
and <field_rules>
.
Besides ignore you can use rename rules for documents or transforms on attributes to create an adapter for your migration. This way you can make a meaningful transform if you really need it.
The xml already provides the foundation for this extract - transform - load (etl).
They describe it more thoroughly here: http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html#migration-config
The below xml shows all possible configurations:
<map xmlns:xs="." xs:noNamespaceSchemaLocation="map.xsd">
<source>
<document_rules>
<ignore>
<document>some_document2</document>
</ignore>
<rename>
<document>some_document</document>
<to>some_dest_document</to>
</rename>
<log_changes>
<document key="primary_key">some_dest_document</document>
</log_changes>
</document_rules>
<field_rules>
<move>
<field>some_document1.field1</field>
<to>some_document1.field2</to>
</move>
<ignore>
<field>some_document3.field8</field>
</ignore>
<transform>
<field>some_document1.field1</field>
<handler class="\Migration\Handler\Convert">
<param name="map" value="[value1:value2;value3:value4;value5:value6;]" />
</handler>
</transform>
</field_rules>
</source>
<destination>
<document_rules>
<ignore>
<document>some_document8</document>
</ignore>
</document_rules>
<field_rules>
<transform>
<field>some_document5.field3</field>
<handler class="\Migration\Handler\SetValue">
<param name="value" value="10" />
</handler>
</transform>
</field_rules>
</destination>
</map>