1

I am new to Magento2, I need some guidance from magento geeks for migrating data from magento1 to magento2.

Quick Overview
I received a system that was built in magento2 from scratch. So I think there is no need to migrate the Themes, Extensions and other things except data from magento1 system as described in docs (see link below).

https://devdocs.magento.com/guides/v2.0/howdoi/migrate/migrate.html

I tried to read this link, and finally reached to this point where I have no understanding of settings.xml (see link below) file i:e which files I need to ignore, and which to include (That's the main issue)

https://devdocs.magento.com/guides/v2.0/migration/migration-tool-internal-spec.html#settings-migration-mode

Can someone please help me understand, what is the best way to migrate data/settings from Magento1 system to Magento2.

Feedback is much appreciated!!

  • please check my ans for step by step information about migration. – Aasim Goriya Aug 31 '18 at 4:37
2

Please check following steps for DATA MIGRATION FROM MAGENTO 1 to MAGENTO 2

Setup m1 database and setup m2 project

Before start migration please install fresh magento, Also put magento1 database and Magento2 database on same server

Stpe 1:

Install datamigration tool in fresh Magento
composer require magento/data-migration-tool:2.2.5

Step 2:

Go to to this Directory "{your_root_directory}/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.2.4(Magento 1 version)/"
Rename file config.xml.dist to config.xml (remove .dist from end)
Rename file map.xml.dist to map.xml (remove .dist from end)

Step 3:

Open config.xml (From this directory "{your_root_directory}/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.2.4(Magento 1 version)/config.xml")

Set database name, username and password on line number approx 100

//Magento 1 database access
<source>
    <database host="localhost" name="mad1live" user="root" password="mysql123" />
</source>

//Magento 2 database access
<destination>
    <database host="localhost" name="mad2migration" user="root" password="mysql123" />
</destination>

Remove .dist from map.xml.dist on this line no approx 107 
Code after edit : <map_file>etc/opensource-to-opensource/1.9.2.4(Magento 1 version)/map.xml</map_file>

Copy crypt key from magento 1 /app/etc/local.xml and set in config.xml Example:

<options>
    ...
    <crypt_key>f5c82fa911418341aec329db9f798f81</crypt_key>
    ...
</options>

Step 4: Run folllwing commands one by one.

sudo php bin/magento migrate:settings -r {{path_to_your_root_directory}}/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.2.4/config.xml

sudo php bin/magento migrate:data -r {{path_to_your_root_directory}}/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.2.4/config.xml

sudo bin/magento migrate:delta -r {{path_to_your_root_directory}}/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.2.4/config.xml
  • Awesome guidline, its very helpful to me. Thanks @Aasim – user59799 Aug 31 '18 at 4:33
  • Very nice explanation, @Aasim what if I don't want to do this as a fresh Install of Magento2. My Magento2 application is already complete. Do you think that I should copy all the theme/css/js changes after migrating data from M1-M2 as a fresh install of M2? – Irfan Ahmed Sep 3 '18 at 10:23
  • @IrfanAhmed I never tried that but I think that should work, please try and let me know if you get any error. – Aasim Goriya Sep 4 '18 at 4:19
  • @AasimGoriya I follow your migration step but settings command run after SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'principal' for key 'STORE_GROUP_CODE' – Rakesh Donga Feb 22 at 5:40
  • @AasimGoriya,I migrated all data successfully, I need to skip orders, only need to migrate products and customers – jafar pinjar Apr 15 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.