How to migrate the magento 2

  1. dump the old database data
    • mysqldump -u root -p database_name > backup.sql;
  2. dump the new database data
    • mysqldump -u root -p database_name > backup.sql;
  3. create the new database and input the step 2 data to new database data or direct use the step 2 database file
  4. find the order and copy the old data to new databases
    1. sales_invoice
    2. sales_invoice_comment
    3. sales_invoice_grid
    4. sales_invoice_item
    5. sales_invoiced_aggregated
    6. sales_invoiced_aggregated_order
    7. sales_order
    8. sales_order_address
    9. sales_order_aggregated_created
    10. sales_order_aggregated_updated
    11. sales_order_grid
    12. sales_order_item
    13. sales_order_payment
    14. sales_order_status
    15. sales_order_status_history
    16. sales_order_status_state
    17. sales_order_tax
    18. sales_order_tax_item
    19. sales_shipment_item
    20. sales_shipping_aggregated
    21. sales_shipping_aggregated_order
  5. find the customer and copy the old data to new databases;
    1. customer_address_entity;
      customer_address_entity_datetime;
      customer_address_entity_decimal;
      customer_address_entity_int;
      customer_address_entity_text;
      customer_address_entity_varchar;
      customer_entity;
      customer_entity_datetime;
      customer_entity_decimal;
      customer_entity_int;
      customer_entity_text;
      customer_entity_varchar;
  6. Category Creation in magento
    Once category is created from magento admin, then the created category information will be reflect or insert  into following tables in magento
    1. catalog_category_entity
    2. catalog_category_entity_datetime
    3. catalog_category_entity_decimal
    4. catalog_category_entity_int
    5. catalog_category_entity_text
    6. catalog_category_entity_varchar
    7. catalog_category_flat
  7. upload the new data to ftp
    • mysql -u root -p database_name < backup.sql
  8. use the magento update, compile, deploy, reindx, clean cache, flush cache and fix permissions