Recover categories and products from a broken Magento database
This is an old revision of the document!
I had a client who inadvertently upgraded from Magento 18.104.22.168 to 22.214.171.124 via Virtualmin script installer and ended up with a broken store. We were then trying to connect the database to a fresh install of 126.96.36.199 to no avail, so we decided to just extract all catalog* and eav* tables of the spoiled database and import them into a clean 188.8.131.52 database.
Once you disabled foreign key constraints, this is pretty easy to do. This can be easily achieved by adding
SET foreign_key_checks = 0;
to the top of your sql queries for steps 2 and 3:
- export all catalog* and eav* tables (via phpMyAdmin) from the old database
- delete all catalog* and eav* tables with these sql quieries in the new database
- import all exported tables from step 1 into the new database