Data Migration Tool for Community Edition was recently released by Magento.

Before you begin the Data Migration, it is important to keep in mind the below points for successful migration

  • Don’t make any changes in Magento 1 Admin except for Order Management.
  • Stop all cron jobs in Magento 1
  • Don’t alter any code
  • Don’t make changes in Magento 2 Admin and Storefront. 
Supported Versions

Following versions are supported for Migration

  • Community Edition (CE) version 1.6.x, 1.7.x, 1.8.x, 1.9.x
  • Enterprise Edition (EE) version 1.11.x, 1.12.x, 1.13.x, 1.14.x
Migration Tool – Terminologies

There are a lot of differences in the structure and format of data between Magento 1 and Magento 2. The custom mapping of structure and data between Magento 1 and Magento 2 are declared in the mapping files. If the mapping is not done properly, then there will be errors in data migration processing.

Map – set of rules that describe connections between Magento 1.x and Magento 2.0 data structures

Mode – Mode of operation in Data Migration through basic commands.

  • Settings – Migrates all possible configuration settings from 1.x to 2.x
  • Data – Bulk migrates data from your Magento 1 DB to your Magento 2 DB
  • Delta – Incremental “catch-up” migration after the initial bulk data migration 
Migration Plan
  • STEP 1: Review your current site (Extensions and Modules)
  • STEP 2: Capacity Planning (Servers)
  • STEP 3: Build and Test the Magento 2
  • STEP 4: Start Your Migration
  • STEP 5: Incremental Updates
  • STEP 6: Go Live
Data Migration Flow Chart

 

data Migration 1

 Prerequisites
  • Install new Magento 2 environment on the server.
  • Stop Magento2 cron Jobs
  • Backup the Magento 2 database.
  • Check the data migration access to both Magento 1 and Magento 2 databases.
Installation, Configuration, and Mapping

Data Migration tool is not an extension, it is a shell app which requires Magento 2 Framework to work. The data migration tool for the Community Edition is available only in GIT HUB.

Install from GITHUB (Update through Command Line)

After installation, the following directory contains the mapping and the configuration file

<your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/ce-to-ce

Configuration

  • Choose the right folder based on your Magento version.
  • Copy the config.xml.dist to config.xml

 

p1

<source> – Database details and its credentials of Magento 1.X

<destination> – Database Details and it credentials of Magento 2.X

crypt_key – Encryption key from Magento 1.X (local.xml).

Mapping Files

Data Migration tools use the mapping files to perform custom mapping between Magento 1 and Magento 2 including

  • Changes in the table name and field name
  • Ignoring tables and fields
  • Transferring the table / field 

The following image is an example of Map Configuration file

p2

MAP Steps

  • Based on the Configuration file chosen, copy the map.xml.dist to map.xml
  • Make necessary changes in Config.xml
  • Transferring most of the data from Magento 1 to Magento 2
  • This step reads instructions from map.xml

Areas

  • Source – contains rules of source database
  • Destination – contains rules of destination database

Options

  • ignore – document, field or data type marked with this option will be ignored.
  • rename – describes name relations between documents with the different name. In a case when destination document name is not the same with the source document – you can use rename option to set source document name similar to destination table name.
  • move – sets the rule to move specified field from source document to destination document. NOTE: destination document name should be the same with the source document name. If source and destination document names are different – you need to use rename option for the document that contains moved field.
  • transform – is an option that allows the user to migrate fields according to behavior described in handler
  • handler – describes transformation behavior for fields. To call the handler, you need to specify.
Run the Data Migration Tool

Command

bin/magento migrate:<mode> [-r|–reset] {<path to config.xml>}

<mode> –  settings / data / delta.

The Data Migration Tool saves its current progress as it runs. If errors or user intervention stops it from running, the Data Migration Tool resumes progress from the last known good state.

Manual Migration (Media, Storefront design, and ACLs)

Media

  • All media files (for example, images for products, categories, the WYSIWYG editor, and so on) should be copied manually from <your Magento 1 install dir>/media to <your Magento 2 install dir>/pub/media.
  • However, do not copy .htaccess files located in the Magento 1 media folder. Magento 2 has its own .htaccess that should be preserved.

Storefront Design

  • Design files (CSS, js, templates, XML layouts) location and format have been changed.
  • Layout Updates stored in the database.

ACLs (Access Control Lists)

  • You must manually re-create all credentials for web services APIs (that is SOAP, XML-RPC, and REST)
  • You must manually re-create all administrative users and associate them with access privileges
After Migration

Start Magento 2 CRON jobs

Flush all Magento 2 cache types

  • magento cache:status
  • magento cache:enable [type] … [type]
  • magento cache:disable [type] … [type]
    • magento cache:disable db_ddl full_pagemagento cache:clean [type] … [type]
  • magento cache:clean [type] … [type]
  • magento cache:flush [type] … [type]
    • magento cache:flush –all

Re-index all Magento 2 indexers

  • magento indexer:info
  • magento indexer:status [indexer]
  • magento indexer:reindex [indexer]

Hope this article helps you. Good Luck for your Data Migration.

References

Be the first to Know

Subscribe to our blog to get the latest articles directly to your inbox.

READY TO DRIVE SALES?

Request a Quote Today

Request a Quote

Leave a Reply

1 Comment on "Magento 2 – Data Migration"


Guest
jayaprakash
10 days 21 hours ago

Hi Suresh,

i have magneto1.9.3 to Magento2 migration if am start both data files same folder m1 and m2?
i have only data migration need after magento2_data_migration 1.7 Ls orders