|
I wanted to share my story with you newbees out there and my new understanding of the magento upgrade process.. when it doesn’t work.
I host with simplehelix.com. I use the installitron to upgrade my system, it has an auto backup system which seems great and has worked for us through 3 upgrades, until now.
I followed the wizard, backed-up my files / db, and performed the upgrade. After i was done, I noticed that magneto had not been upgraded to the new version, it still reported 1.3.0. I decided to use the installitron to restore. IT DIDN’T WORK. The restore failed on the db. I didn’t know what to do, i went to my home page and noticed some errors on “failed to create table XYZ”. Didn’t know why.
The magento admin worked, so i attempted to re-upgrade via the downloader “install-latest-all” or something like that. That failed as well.
I called my hosting provider and asked them to restore from before my attempt to upgrade. A few hours and messages back and forth, it was restored. Magento, still complained about creating tables. I checked the forums and noticed others with the same issues, telling me to drop them. So i did. And it seemed to work. But then later I had other problems, when a new customer when to place an order, it failed!
It turned out that when the hosting provider restored my db, there were about a 120 or so foreign keys that were prefixed with ‘r1soft_saved_database_W0FJMl’. Hours later after back and forth through their ticket system, I discover myself, that r1soft is their backup system, which when it restored my db, it decided to leave prefix only a few of my constrains to incorrectly referencing this non existent database . Which caused a whole bunch of new un-needed issues.
After spending the entire evening (8pm to 2am), i had to update the schema to remove those references and re-upload the fixed database, i needed to split that out to 3 files from 1.9million records (cut and paste was a nightmare btw).
Now that i had everything working again, magento reported 1.3.0, I decided to try the upgrade again, this time to extract the install files over the existing magento folders (followed the wiki instructions here at magentocommerce).
Guest what, I ran the home page and… “Failed creating TABLE XYZ”, already exists!!!! okay, so i figured this out on my own, what happens when they restore the db and files, is that they over write existing files / tables, leaving the “new” ones there, so when magento tries to Create what it believes to be “Brand NEW Tables”, it cannot, because of the previous failed upgrade had already created them.
I had to drop all of these new tables, one by one. After all that, magento gave me more issues on ID’s already existing. For some reason 3 of these tables imvw_log_visitor_* where messed up. I Truncated all three and it resolved that issue.
If this should happen to you and you ask for a restore. Ensure that for the database that specify to them to DROP ALL TABLES and then perform the restore. The same goes with the filesystem, rename the existing magento folder or delete, then RECREATE it from the restore.
Lessons learned : DO NOT RESTORE using OVERWRITE on a failed upgrade, DROP all tables before the DB Restore. And don’t add any additional issues by your DB Restore injecting bad references to a database that doesn’t exist in my mysql environment.
Thanks for listening (reading), I feel a little better now.
ps. ticket systems are painful.
|