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 220.127.116.11 to 18.104.22.168 via Virtualmin script installer and ended up with a broken store. We were then trying to connect the database to a fresh install of 22.214.171.124 to no avail, so we decided to just extract all catalog* and eav* tables of the spoiled database and import them into a clean 126.96.36.199 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 in the new database
- import all exported tables from step 1 into the new database