1

We have two enviroments Staging and Production, for Magento 2.3.5. At the moment these two enviroments have different database structure, meaning that we can't just dump the entire DB and restore it to the other enviroment. We need to merge Orders, products,customers from one DB to another. I have thought of the following 3 options.

  1. Use Magento 2 default import / export function to export orders, products and customers then import to another enviroment
  2. dump all relavant mysql tables for orders, products and customers and restore them to another enviroment
  3. write an custom module, something like using Magento's resrouce model, to transfer orders, products and customers to another enviroment

which one of the above option would you suggest? are there any other better way to do it?

4
  • Does Magento (CE) provide a default import/export function to export orders? how? Please help me to figure out that Mar 20, 2021 at 8:19
  • And I curious to know how you have managed to complete this task? Please let me know how you have managed to achieve this. Thanks Mar 20, 2021 at 8:21
  • @NileshDubey I haven't done it yet. but I will consider using the Magento default import / export under admin -> system -> Data Transfer, if you ever managed to try this out, please let me know how it goes :) Mar 22, 2021 at 8:30
  • No for me I haven't got the option to import/Export for Orders. Please share your knowledge because this will surely help me in future Mar 23, 2021 at 14:10

1 Answer 1

2

I would definitely opt for the first option

Use Magento 2 default import / export function to export orders, products and customers then import to another environment

Why do so? Because Magento will manage all entity dependencies and you won't have to be concerned with handling foreign keys, list of tables, mappings and error treating.

You just need to make sure that all relevant attributes and columns exist in the destination database.

2
  • Seems I can only Export Products and Customers by using Magentos default Import / Export functions. There's no option to Export Orders. Mar 24, 2021 at 8:22
  • yes, unfortunately, that's true. however, there are some extensions on the marketplace which might help you. i haven't tried any of them yet, but if i would need to do this task, i would do it.
    – Diana
    Mar 24, 2021 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.