I used data-migration-tool and did migration from 1.9 to 2.3 but lost all the products which were already in M2.

Before the migration there were around 2000 products and now they lost. I have backup of complete M2-database before migration.

How to get those product back in magento2.


I followed answer of @Mitro and it worked with some efforts but images are still not displaying though images can be open by media-url.

I tried command php bin/magento catalog:image:resize but didnt work

  • using migration tool or any custom module ? Commented Jul 30, 2019 at 13:10
  • with data-migration-tool
    – Jarnail S
    Commented Jul 30, 2019 at 13:11

5 Answers 5

  1. Connect the database before migration to magento 2.
  2. Export Product from Mageneto 2 backend. Go to System -> Data Transfer -> Export
  3. Save the exported product csv file.
  4. Connect the migrated database to the M2
  5. Go to System > Data Transfer > Import : from here you can import your old product which you have exported earlier.

Please write comment if this solution works for you. Thanks

  • I am also thinking same but I am not sure why are those products get deleted. Did you face such issue before. Migration is long process and in my case, it takes 2 hours to migrate all data because of m1 big database.
    – Jarnail S
    Commented Jul 30, 2019 at 13:25
  • Yes I used to apply the same process and it was work for me
    – Mitali
    Commented Jul 30, 2019 at 13:31
  • You don't need to do migration again. You just have to connect with those 2 databases one after other
    – Mitali
    Commented Jul 30, 2019 at 13:33
  • Great. I will try and update you back.
    – Jarnail S
    Commented Jul 30, 2019 at 13:58
  • I have done the same but images are not displaying on product-listing and product page. Here is reference link of other question magento.stackexchange.com/q/290347/29175 .Please check if you can help me out
    – Jarnail S
    Commented Sep 23, 2019 at 10:23

Please check this Magento Devdocs page.

It is clearly said that they do not recommend creating new entities (products, categories, attributes, etc.) in your Magento 2 store before migration because the Data Migration Tool overwrites such new entities with the old ones from Magento 1.

So, you need to do first import export of the products and then you need to do that migration.

  • All is done. Only product-images are not displaying.
    – Jarnail S
    Commented Sep 28, 2019 at 10:46
  • Just in case anyone else has the same problem, removing the .htaccess in the media folder did the trick. I don't know if that's the best possible solution though! Thanks!
    – Mayur
    Commented Sep 28, 2019 at 10:57
  • Issue is solved or not?
    – Mayur
    Commented Sep 28, 2019 at 19:07
  • not solved yet !!
    – Jarnail S
    Commented Sep 28, 2019 at 20:05
  • 1
    Ok sir. If possible give me development server details to try.
    – Mayur
    Commented Sep 29, 2019 at 8:29

Let's focus on the image problem.

  1. Take a product, write it's product id and check if there are images associated
  2. Launch the following sql query

SELECT * FROM catalog_product_entity_media_gallery_value_to_entity as A, catalog_product_entity_media_gallery as B WHERE A.value_id = B.value_id AND A.entity_id = [YOURPRODUCTID]

Check your tables name and insert the correct product_id.

  1. Check if there are imges for that product AND if there are disabled (field disabled = 1)

Did you try to run image resize command for product image not showing?

php bin/magento catalog:images:resize

Data-migration-tool tools often delete previous data like product and categories in Magento 2.So better download the CSV first and after migration of product upload the CSV from admin.Hope it will help

Your Answer

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

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