MAGENTO

Data Migration from Magento 1.X to Magento 2.X

Data Migration tool officially released by Magento for Community editions. For Enterprise edition only Partners can get the data migration tool.

There is few rules for successful migration.

  • Don’t make any changes in Magento 1 admin except order Management.
  • Stop all cron jobs in Magento 1
  • Don’t alter any code
  • Don’t make changes in Magento2 admin and storefront.

Supported Versions
Following version 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


Terminology in Migration Tool.
There are lot of differences in the structure and format of data between Magento 1 and Magento 2. In Map all those are declared. When the differences are not mentioned in Map, then we will get 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

Prerequisite
Install new Magento 2 environment in 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 shell app which requires Magento2 Framework to work. We can get data migration tool from git hub only for community edition.

Install from Github

  • composer config repositories.data-migration-tool git
  • https://github.com/magento/data-migration-tool-ce
  • composer require magento/data-migration-tool:dev-master
    After installation, the following directory contains mapping and configuration file
  • <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/ce-to-ce

Configuration.

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

<source>    <database host=”127.0.0.1″ name=”magento11302″ user=”root” password=”pass”/></source><destination>    <database host=”127.0.0.1″ name=”magento2″ user=”root” password=”pass”/></destination><options>     <crypt_key>f3e25abe619dae2387df9fs594f01985</crypt_key></options>

  • 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 uses mapping file to enable us to perform custom mapping between Magento 1 and Magento 2 which including changes in table name and field name, ignoring tables and fields and Transferring the table / field.
Following picture is an example of Map configuration file

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 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 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 document that contains moved field
  • transform – is a option that allows user to migrate fields according to behavior described in handlers
  • handler – describes transformation behavior for fields. To call the handler you need to specify

Run the Data Migration Tool
Command
bin/magento migrate: [-r|–reset] {}
– settings / data / delta.

The Data Migration Tool saves its current progress as it runs. If errors or user intervention stop it from running, the Data Migration Tool resumes progress at 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 /media to /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 in files (css, js, templates, XML layouts) changed its location and format
  • Layout Updates stored in database. Placed through Magento 1 Admin in CMS Pages, CMS Widgets, Category Pages and Product Pages

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_page
  • 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]

References.
http://devdocs.magento.com/guides/v2.0/migration/bk-migration-guide.html

Free Web Hosting