How to move Magento Customer, Order and invoice from lower version to upper version



We have upgraded a Magento website from 1.8.0 to the Magento ver. 1.9.3.1 and we have taken 2-3 days because website has a lot of the products and customer and it is making good amount of orders per day so our main issue was we can not down the production website for 2-3 days due to the traffics and number of orders, so we have decided to create a staging with the clone of the production website and we have upgraded the version here but the production was live and it has got good number of the orders and customers so client wants to keep these orders and customers in the upgraded version of the Magento, it was little bit hard for us but after doing some research on internet we have got the solution and here I am sharing it here, check the steps given below:

Step 1: Open The Production website database and identify the tables given below for the Customers:

customer_address_entity
customer_address_entity_datetime
customer_address_entity_decimal
customer_address_entity_int
customer_address_entity_text
customer_address_entity_varchar
customer_eav_attribute
customer_eav_attribute_website
customer_entity
customer_entity_datetime
customer_entity_decimal
customer_entity_int
customer_entity_text
customer_entity_varchar
customer_form_attribute
customer_group

Step 2: Now Export these tables but Disable foreign key checks as per the given screenshot.
DisableForeignKey

Step 3: Now Open The Production website database and identify the tables given below for the Orders and Invoice:

sales_bestsellers_aggregated_daily;
sales_bestsellers_aggregated_monthly;
sales_bestsellers_aggregated_yearly;
sales_billing_agreement;
sales_billing_agreement_order;
sales_flat_creditmemo;
sales_flat_creditmemo_comment;
sales_flat_creditmemo_grid;
sales_flat_creditmemo_item;
sales_flat_invoice;
sales_flat_invoice_comment;
sales_flat_invoice_grid;
sales_flat_invoice_item;
sales_flat_order;
sales_flat_order_address;
sales_flat_order_grid;
sales_flat_order_item;
sales_flat_order_payment;
sales_flat_order_status_history;
sales_flat_quote;
sales_flat_quote_address;
sales_flat_quote_address_item;
sales_flat_quote_item;
sales_flat_quote_item_option;
sales_flat_quote_payment;
sales_flat_quote_shipping_rate;
sales_flat_shipment;
sales_flat_shipment_comment;
sales_flat_shipment_grid;
sales_flat_shipment_item;
sales_flat_shipment_track;
sales_invoiced_aggregated;
sales_invoiced_aggregated_order;
sales_order_aggregated_created;
sales_order_aggregated_updated;
sales_order_status;
sales_order_status_label;
sales_order_status_state;
sales_order_tax;
sales_order_tax_item;
sales_payment_transaction;
sales_recurring_profile;
sales_recurring_profile_order;
sales_refunded_aggregated;
sales_refunded_aggregated_order;
sales_shipping_aggregated;
sales_shipping_aggregated_order;

Step 4:Now Export these tables by Disableing foreign key checks as per the given screenshot.
DisableForeignKey

Step 5: Now Open the Upgraded Magento website and Identify these customer tables and rename / delete these tables and import your backup which you have taken from the production.

Step 6: Now Open the Upgraded Magento website and Identify these Orders and Invoice tables and rename / delete these tables and import your backup which you have taken from the production.

Now check the admin Panel and you will see all the updated orders and customer in the admin panel, hope that helps.

Note : it is only for the 1.7.2 to the higher version of the Magento it will not work with the below the Magento version of 1.7.2.

As you all aware of the Magento version Upgrade, why we need to upgrade the Magento version from old version to the upgraded version, Please here Why and How we can upgrade the Magento Version

Stay tuned for the Magento and Magento2 latest tutorial and updates, Hope you enjoyed reading, if you need the professional Magento Development we can help you, just Click on the Link and send me your requirements.