Posts Tagged ‘Move magento to another server’

Magento Delayed Migration

Wednesday, August 25th, 2010

Weird title, I know. Here is the synopsis, you are running a Magento store and build a “sandbox” copy of the server so people can add/edit items and you can “push” them to the live server every 45 days.

Well this was far tricker than I originally thought, first I copied the db and the front-end. No problems there, now everything is the same and they can begin editing. Next they added 1k products to the sandbox, but also updated a bunch of information in the live server. So I exported all items from the live server and imported them in to the sandbox, now the sandbox has all the current updates and the new items.

1) Exported this and imported in to the live server. Crashed mysql ruined this and all my other magento stores.
2) Exported this and split in to 10 files of 200 records each and began importing, broke magento and all my other magento stores.
3) Exported, split, edited and created my own command line import program, success, partially. It imported the base information no options, no images, no cross-sell data, etc….
4) Exported a fresh copy of the sandbox with the updates, then exported a fresh copy of the live server, imported both in to new dbs. From there I deleted all catalog_ tables, all eav_ talbes, all rating tables, all review tables, all salesrule tables, all tag tables and the core_url_rewrite table. Once this was done, I copied the images from one server to the other with the -u option so only new or updated images would copy to the /media/catalog/products etc… finally I exported the tables from the sandbox db that I had just truncated in the live db, and viola … worked like a charm