Migrate sales orders from M1 to M2 using Data Migration Tool


  • You should have installed Data Migration Tool, and configured it as well as the documentation says (data-migration-tool).
  • Have the corresponding M1 and M2 database set up on your environment.


Once you go through your magento 2 root directory and run

you will get the following error message:

[ERROR]: Source documents are not mapped: sales_flat_creditmemo_grid,sales_flat_invoice_grid,sales_flat_order_grid,sales_flat_shipment_grid

In this case, you will need to proceed as follows:

  • Comment out or remove line 20 to 31 in map.xml file.
  • Add inside <document_rules> tag of <source> tag.
  • Add below content under <field_rules> tag of <source> tag.
  • Comment out or remove line inside <destination> <document_rules> tag.
  • Add below line inside <destination> part of <field_rules> tag.
  • Potential errors:
    • If you have any other map error, you should handle it using a <transform> and a <handler>, or ignore it on the fields rule section.
    • Any integrity check error should be solved via database removing involved orphan records.
    • [Exception] Warning: Error while sending QUERY packet.
      • It should be solved increasing the max_allowed_packet variable from sql (SET GLOBAL max_allowed_packet=524288000;)


Once you change and finish everything, let’s proceed with

and if you get the following message:

[INFO][mode: data][stage: data migration][step: PostProcessing Step]: Migration completed

means that everything went well.