In my current Magento 2 instance I have added products and categories manually as well as all the settings.
Is it possible to migrate only orders and customers data from my old site using Data Migration tool?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityIn my current Magento 2 instance I have added products and categories manually as well as all the settings.
Is it possible to migrate only orders and customers data from my old site using Data Migration tool?
Yes, it is possible but you will have to modify a bit the config files to get what you need.
Here is an example of the Data Migration Tool config.xml
used to migrate only customers and newsletters subscribers.
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="../../config.xsd">
<steps mode="data">
<step title="Data Integrity Step">
<integrity>Migration\Step\DataIntegrity\Integrity</integrity>
</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="Newsletter Subscribers Step">
<integrity>Migration\Step\Newsletter\Integrity</integrity>
<data>Migration\Step\Newsletter\Data</data>
<volume>Migration\Step\Newsletter\Volume</volume>
</step>
</steps>
<steps mode="delta">
<step title="Customer Attributes Step">
<delta>Migration\Step\Customer\Delta</delta>
<volume>Migration\Step\Customer\Volume</volume>
</step>
</steps>
<source>
<database host="172.x.x.x" name="source-db-name" user="dbuser" password="dbpassword"/>
</source>
<destination>
<database host="172.x.x.x" name="source-db-name" user="dbuser" password="dbpassword"/>
</destination>
<options>
<map_file>etc/ce-to-ee/1.7.0.0/map.xml</map_file>
<customer_map_file>etc/ce-to-ee/map-customer.xml</customer_map_file>
<customer_document_groups_file>etc/ce-to-ee/customer-document-groups.xml.dist</customer_document_groups_file>
<customer_attribute_groups_file>etc/ce-to-ee/customer-attribute-groups.xml.dist</customer_attribute_groups_file>
<delta_document_groups_file>etc/ce-to-ee/deltalog.xml</delta_document_groups_file>
<map_document_groups>etc/ce-to-ee/map-document-groups.xml.dist</map_document_groups>
<bulk_size>0</bulk_size>
<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>
<edition_migrate>ce-to-ee</edition_migrate>
<edition_number>1.7.0.0</edition_number>
<init_statements_source>SET NAMES utf8;</init_statements_source>
<init_statements_destination>SET NAMES utf8;</init_statements_destination>
<crypt_key>xxxxxxxxpatataxxxxxxxxxx</crypt_key>
</options>
In this example you can see how all unnecessary steps have been removed to leave only Customer Attributes Step
which is in charge of customer migration.
Newsletter Subscribers Step
is a custom step created to migrate specific data.
You can use this example to modify your config.xml
file and migrate only customers and sales data.
Hope it helps.
data
step where the tool creates what it needs for delta
step to work.
Jul 24, 2017 at 13:49
delta
step. It may help you achieve what you want to do. magento.stackexchange.com/questions/132744/…
Jul 24, 2017 at 23:59
Firstly Follow http://devdocs.magento.com/guides/v2.2/migration/migration-migrate-data.html
Difficulty: You only need to migrate customer and sales data only.
Solution:
Steps Overview
- install data migration tool.
- Map tables for sales and customers only in
map.xml
file and skip all other unnecessary steps inconfig.xml
file.- Solve errors step by step if occurred.
1.Install http://devdocs.magento.com/guides/v2.2/migration/migration-tool-install.html
composer config repositories.magento composer https://repo.magento.com
composer require magento/data-migration-tool:2.1.x( your installed version)
2.config http://devdocs.magento.com/guides/v2.2/migration/migration-tool-configure.html
config.xml file located in
vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.1(your_version)
. if not find renameconfig.xml.dist
toconfig.xml
Comment all unnessary
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="../../config.xsd">
<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="Data Integrity Step">
<integrity>Migration\Step\DataIntegrity\Integrity</integrity>
</step>
<!-- <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>
<step title="PostProcessing Step">
<data>Migration\Step\PostProcessing\Data</data>
</step>
</steps>
<steps mode="delta">
<step title="Customer Attributes Step">
<delta>Migration\Step\Customer\Delta</delta>
<volume>Migration\Step\Customer\Volume</volume>
</step>
<!-- <step title="Map Step">
<delta>Migration\Step\Map\Delta</delta>
<volume>Migration\Step\Map\Volume</volume>
</step> -->
<!-- <step title="Log Step">
<delta>Migration\Step\Log\Delta</delta>
<volume>Migration\Step\Log\Volume</volume>
</step> -->
<step title="OrderGrids Step">
<delta>Migration\Step\OrderGrids\Delta</delta>
<volume>Migration\Step\OrderGrids\Volume</volume>
</step>
<step title="SalesIncrement Step">
<delta>Migration\Step\SalesIncrement\Delta</delta>
<volume>Migration\Step\SalesIncrement\Volume</volume>
</step>
</steps>
map.xml file located in vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.1(your_version). if not find rename from map.xml.dist
to map.xml
comment those which need to migrate and
<move>
used to move,<field_rules>
used for table fields,<document_rules>
used for tables and<ignore>
for ignore fields
<map xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="../../map.xsd">
<source>
<document_rules>
<ignore>
<document>googleshopping_attributes</document>
</ignore>
<ignore>
<document>googleshopping_items</document>
</ignore>
<ignore>
<document>googleshopping_types</document>
</ignore>
<!-- <ignore>
<document>sales_flat_creditmemo_grid</document>
</ignore>
<ignore>
<document>sales_flat_invoice_grid</document>
</ignore>
<ignore>
<document>sales_flat_order_grid</document>
</ignore>
<ignore>
<document>sales_flat_shipment_grid</document>
</ignore>
<ignore>
<document>customer_entity</document>
</ignore>
<ignore>
<document>customer_entity_datetime</document>
</ignore>
<ignore>
<document>customer_entity_decimal</document>
</ignore> -->
</document_rules>
<field_rules>
<move>
<field>sales_flat_creditmemo_grid.grand_total</field>
<to>sales_creditmemo_grid.order_base_grand_total</to>
</move>
<!-- source table custom grid field-->
<ignore>
<field>sales_flat_invoice_grid.base_grand_total</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.store_to_order_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.base_to_order_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.store_to_base_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.base_to_global_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.creditmemo_status</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.invoice_id</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.store_currency_code</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.order_currency_code</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.base_currency_code</field>
</ignore>
</field_rules>
</destination>
</map>
**3. RUN ** http://devdocs.magento.com/guides/v2.2/migration/migration-migrate-data.html
bin/magento migrate:data {<path to config.xml>}
Possible errors : Source documents are not mapped:(customer_)tables. check
config.xml
andmap.xml
file again if custom migration then usesetting.xml
alsoNote: try , try and try until you will complete migration. Just focus on every errors and steps.