Question

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.

Update:

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

Was it helpful?

Solution

  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

OTHER TIPS

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top