5 (100%) 2 votes

Magento Data Migration Tool is a product of Magento use command-line interface (CLI) to move all of your products, customers, and order data, store configurations, promotions and more from Magento 1 to Magento 2. The tool can verify the consistency between Magento 1 and 2 database structures (tables and fields), tracks the data transfer progress, creates logs, and runs data verification tests.

The tool can be operated in three modes: settings, data, and delta. Settings and Data are the most important modes, which migrate configuration settings and main data in the database from Magento 1 to Magento 2. Delta transfers incremental data updates, added to Magento 1 storefront and Admin Panel while running previous migration modes.

Each aforementioned mode consists of several steps that perform tasks specific to the mode (for example: URL rewrite, EAV, settings, etc.). Each step initially checks for data and structure integrity between Magento 1 and Magento 2 databases and, after verification succeeds, performs the transfer. The Tool then checks the volume of transferred data (said Magento).

NOTE: Remember you have to use the same released version of both Magento 2 and the Magento Data Migration Tool. For example, if you are using Magento version 2.3.2, you must also use the Magento Data Migration Tool version 2.3.2. If you need a step-by-step guide to help you migrate from Magento 1 to Magento 2 store, read our in-depth guide of Magento 2 Migration.

Why we need Magento Data Migration Tool?

We need Magento Data Migration Tool, or any data migration when we want to move data from a source to a target system. Companies have many different reasons for migrating data. The more often cause, we need to migrate data when making changes to infrastructure, and in this case, from Magento 1 to Magento 2.

Reasons are also obvious, the Magento 1.x versions will stop the official support, as well as stop releasing new security updates and patches after 2020 by Magento team. Moreover, if you are doing any customizations, you need to do again in the Magento 2.x version, which is quite bad.

You should use Magento official Data Migration Tool, as it is free and easy to use. Other unknown tools are unchecked and may cause loss in your data.

How to Install Magento Data Migration Tool?

There are two ways to install Magento Data Migration Tool:

  • Install the tool from GitHub
  • Install the tool from repo.magento.com

2.1  Install the tool from GitHub

If you use GitHub to clone Magento 2, you can follow the steps:

Step 1 Log in to your Magento server as, or switch to, the Magento file system owner.

Step 2 Change to Magento 2 root directory.

Step 3 Enter the following commands.

version must match the version of the Magento 2 codebase. For example, for version 2.3.2, change it to “2.3.2”:

Magento Data migration tool

2.2 Install the tool from repo.magento.com

To install the Magento Data Migration Tool from repo.magento.com, you must update composer.json in the Magento root installation directory to provide the location of the Data Migration Tool package. Open the command line in the root folder of Magento 2.

Following four steps:

Step 1 Log in to your Magento server as, or switch to, the Magento file system owner (The Magento file system owner is sometimes referred to as the command-line user).

Step 2 Change to Magento 2 root directory.

Step 3 Enter the following commands.

version must match the version of the Magento 2 codebase. For example, for version 2.3.2, enter:

Step 4 When prompted, enter your authentication keys. Your public key is your username; your private key is your password.

How to Configure Magento Data Migration Tool?

To configure Magento Data Migration Tool, you must first create a  config.xml configuration file into the provided sample. To create a configuration file:

  1. Log in to your Magento server as, or switch to, the Magento file system owner.
  2. Change to the following directory.
  3. Enter the following command to create a config.xml from the provided sample: 

    Magento Data Migration Tool
  4. Open config.xml in a text editor.
  5. Specify the following at minimum.

For example, if your database owner’s username is root with password pass and you use the prefix magento1 in your Magento 1 database, use the following in config.xml:

– Work with configuration and mapping files

The Data Migration Tool uses mapping files to enable you to perform custom database mapping between your Magento 1 and Magento 2 databases, including:

  • Changing table names
  • Changing field names
  • Ignoring tables or fields

– Adapt transferring data of a field to Magento 2 format

Mapping files for supported Magento versions are located in subdirectories of  <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc

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.
  4. The  <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc and <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/<ce version> directories contain the following configuration files

Even though you will be working with  map.xml.dist file most of the time, the following table discusses each mapping and other files.

How to use Magento Data Migration Tool?

It is simple to use Magento Data Migration Tool, you just need to do the following steps:

  1. Migrate settings.
  2. Migrate data.
  3. Migrate changes.
  4. Other data to be migrated manually.

4.1 Migrate settings

To start migrating settings, run the settings migration command:

You should take note:

  • [-r|–reset] is an optional argument that starts the migration from the beginning. You can use this argument for testing migration.
  • {<path to config.xml>} is the absolute file system path to the migration tool’s config.xml file; this argument is required.

– The command should be:

For example:

magento data migration tool

4.2 Migrate data

To start migrating data, run the data migration command:

You should take note:

  • [-a|–auto] is an optional argument that prevents migration from stopping when it encounters integrity check errors.
  • [-r|–reset] is an optional argument that starts migration from the beginning. You can use this argument for testing migration.
  • {<path to config.xml>} is the absolute file system path to config.xml; this argument is required.

The command should be:

4.3 Migrate changes

To start migrating incremental changes, run the incremental migration command:

You should take note:

  • [-r|–reset] is an optional argument that starts migration from the beginning. You can use this argument for testing migration.
  • {<path to config.xml>} is the absolute file system path to config.xml; this argument is required.

– The command should be:

Now your database is successfully migrated to Magento 2.

4.4 Other Data to be migrated manually

Beside kinds of Data you can use tool to be migrated, there are four kinds of data that you must do manually:

  1. – Storefront design.
  2. – Media.
  3. – Admin user accounts.
  4. – Access Control Lists (ACLs).

I recommend you to read our full guide for Magento 2 Migration.

Your Magento website needs a powerful Magento ERP for stock control.

DON'T MISS THE CHANCE!

magento erp

Magento 2 Migration - Simple & Definitive Guide
Magento 2 data migration document has ambiguous configuration - How to solve it

Leave a Reply

Your email address will not be published. Required fields are marked *