pellcorp / opendb

Open Media Lending Database
38 stars 24 forks source link

Upgrade from 1.0.6 to 1.6 failing #74

Closed q1x closed 8 years ago

q1x commented 9 years ago

I'm a long time user of OpenDB. I started with a 0.8x install and have upgraded it to 1.0.6 some time ago. This was happily running on an Ubuntu 8.0.4 vm for years. I've recently killed the VM and installed a new 14.04 install and I'm now trying to upgrade to the latest opendb version.

I have the old database restored and moved the old webroot to the new server, that is all working fine. However, Trying to upgrade to 1.6 I had several errors pointing me to first upgrade to 1.5 before trying to upgrade to 1.6.

I've downloaded the 1.5.0.4, however that fails the upgrade with a lot of SQL errors and corrupts my database (all items are gone).

Can you tell me what the recommended upgrade path would be in this case?

pellcorp commented 9 years ago

Apologies for not getting to this earlier

pellcorp commented 9 years ago

Ok so 1.0.6 is ancient. do you have a backup of the databas? Can you share it with me. I can setup a 1.5 env and try and upgrade your DB myself. If you can share it send to

q1x commented 9 years ago

Hi Jason,

Thanks for getting back to me, thank you very much for helping! Of course I can share the Mysql DB with you, however the email address is missing from your last message.

I don't think Github supports Private Messages anymore, is there some other way we can get into contact? (IRC/twitter/?)

Thanks again,

Raymond

q1x commented 9 years ago

I think I've found your email address, I'll send the DB to you.

pellcorp commented 9 years ago

Hi,

I have released a new 1.5.0.8 release which includes fixes for mysql 5.5 and latest php support so that users can upgrade from 1.0.5

https://github.com/pellcorp/opendb/archive/RELEASE_1_5_0_8.zip

This should allow you to upgrade.

So install opendb 1_5_0_8 and perform your upgrade from 1.0.6 to 1.5.0.8

Then install new 1.6 version and point to the upgraded db and complete the upgrade.

As always keep a db backup and let me know how you go

pellcorp commented 9 years ago

Ok - so I finally got back to this. I can see that there 350 odd records in file_cache that most likely were not correctly migrated. I am currently figuring out how this should have worked and will get back to you.

Sorry for taking so long

pellcorp commented 9 years ago

I will need your filecache directory as well. For some reason these old style uploaded files were not correctly transfered from filecache to upload as part of the upgrade. This might occur if the filecache directory is missing the files. So I need a copy of your 1.0.6 installation including filecache

pellcorp commented 9 years ago

I updated the 1.5.0.8 with an additional check for missing file cache items when upgrading. Please use this branch instead of the previously mentioned tag.

https://github.com/pellcorp/opendb/tree/RELEASE_1_5_0_8

See below the errors I received:

upgrade-errors

MartinWunderli commented 8 years ago

Dear Jason,

You probably cannot believe it, but I win the 'outdated' race (I also started with 0.8 years ago...). I am still running an Ubuntu 8.04 VM using OpenDB 1.0.5. But now I have to migrate to ubuntu 14.04, since the hardware of the VM server is falling apart... And I have to migrate, reinstall is not an option with more than 1000 DVDs and since I added several language_audio combinations like ITALIAN_5.1 and new system attributes like PUR_DATE (PUR for purchase).

So the old server is: Ubuntu 8.04, MySQL 5.0.96-0ubuntu3, OpenDB 1.05 The new server is/will be: Ubuntu 14.04, 5.5.44-0ubuntu0.14.04.1, OpenDB 1.6

Reading this post, I would think of the following procedure:

-OR-

is it better to copy the web server directory to the new server, import the 1.0.5 dump there, install 1.5.0.7 on top of the existing 1.0.5 directory and run install.php already on the new server? Then upgrade to 1.6?

Cheers and thanks for your help Martin

MartinWunderli commented 8 years ago

I tried the second approach and I am now a bit confused.

Any ideas?

MartinWunderli commented 8 years ago

Hmmmh, will not give up...

I tried the 1.5.0.7 upgrade on the old server (mysql 5.0). Creating a new item after upgrade to 1.5.0.7 showed the usual page, not blank.Fine! But then the upgrade 1.6.0 screen went blank after I clicked next (on Ubuntu 8.04/opendb 1.5.0.7/mysql 5.0). Ooops.

Cheers Martin

MartinWunderli commented 8 years ago

Now I am totally confused... I tried to do again the second approach (see message "I tried the second approach and I am now a bit confused") and now the upgrade to 1.6 also creates a blank page after clicking next...

So I repeat my request for help ;-). I can easily share my web server directores with the 1.0.5 and 1.5.0.7 installation, each including a mysql dump of the used database.

Cheers Martin (martin@wunderli.ch)

pellcorp commented 8 years ago

Hi,

Happy to help if I can, no money required. Make sure to keep the versions separate, just point at the same db to perform the upgrade.

Send me your 1.0.5 db dump if you can and I will take a look myself to see what's going on.

If that goes ok on my end, I will ask to see your actual installation.

But again make sure you do not extract new version over old version, that is guaranteed to break stuff.

pellcorp commented 8 years ago

My email address is jason at pellcorp dot com

pellcorp commented 8 years ago

H,

Did you upgrade to 1.6.0 on the ubuntu 14.04 server? Do you have error log for the ubuntu 14.04.

MartinWunderli commented 8 years ago

Hi I tried both. Upgrading from 1.0.5 to 1.5.0.7 on Ubuntu 8.04 and on 14.04 (I did only once the final step from 1.5.0.7 to 1.6.0, on Ubuntu 14.04, thought it would fix the problem, but it did not). So same effect on both Ubuntus, blank page when inserting items. The last test and the error log were on Ubuntu 14.04 though.  CheersMartin

pellcorp commented 8 years ago

The error log you posted was for 1.5.0.7 though, so I need to see logs for 1.6.0 upgrade which won't have the _FILES issue as its been fixed. I did not upgrade 1.5.0.7 to work with latest php

pellcorp commented 8 years ago

I will chase down why the update_on field was changed as part of upgrading. I can't see a reason for it in the code base, and no one else reported it when they upgraded to 1.5.0.7 so its strange.

pellcorp commented 8 years ago

I started looking at this and realised what you sent me does not seem to include a DB export of your 1.0.5 db. I don't need the php source, I need the db data, and it needs to be a phpmyadmin export or a mysql cli export, not a OpenDB export.

pellcorp commented 8 years ago

Oops - sorry just noted the dmp file

MartinWunderli commented 8 years ago

Thanks a lot for helping.

Currently I have Ubuntu 8.04/MySQL 5.0/OpenDB 1.0.5 and Ubuntu 14.04/MySQL 5.5/OpenDB 1.5.0.7 (upgraded from 1.0.5 on the latter machine using the special MySQL 5.5 version). The latter does not allow the adding of new iterms.

However, I can nuke both installations at any time to perform other tests.

pellcorp commented 8 years ago

Ok - I have added a new 1.5.0.8 tag which includes the mysql 5.5 changes and fixes for the $_FILES issue with latest php. You can download that one and you should be able to add new items.

https://github.com/pellcorp/opendb/archive/RELEASE_1_5_0_8.zip

I also fixed the upgrade bug so that the new linked item instances will have the same date as their parent item, so new items appearing in the whatsnew upon login. So I would suggest you redo the upgrade from 1.0.5 with 1.5.0.8, and then upgrade to 1.6.0

Once you have upgraded to 1.6.0 on ubuntu 14.04 please post me your error.log from apache if there is still an issue.

BE SURE to not install 1.6.0 php files into the same directory as 1.5.0.8, that will create issues, just copy your upload/, itemcache, logs, and include/local.config.php from 1.5.0.8 install to 1.6.0

MartinWunderli commented 8 years ago

Strike! Worked well, could add a DVD, no errors in the apache log for 1.6.0. Thanks a lot!

I found a little bug concerning sorting, but will open another thread for that.