ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Upgrading and merging databases from 2.1.x to 2.8.x?

April 29, 2014 2:58am

Subscribe [2]
  • #1 / Apr 29, 2014 2:58am

    vladyn

    176 posts

    Hello all,
    I’m in the middle of upgrade from production (EE 2.1) to Stage (latest EE). After updating a bunch of add-ons, which wasn’t compatible with 2.8 I have to merge the databases somehow.

    I’m upgrating traffic heavy loaded website with a lot of user data so at the current moment my two DB’s - production and stage have significant differences.

    Can somebody advise me please about best and painless way of merging two databases - prod. running on EE 2.1 and upgraded EE 2.8.1.
    If i directly dump production and import it into stage I doubt I’ll have some success. Are they any upgrade scripts for this?

  • #2 / Apr 30, 2014 5:12am

    Rob Allen

    3105 posts

    I’d suggest creating a duplicate 2.1 database and use that to run the standard EE updater, that will ensure all the DB tables are updated correctly while keeping your data intact. If it goes wrong you can always revert to your backup DB and fault fix again.

    Assuming all goes well you can then transfer files and DB to staging.

  • #3 / Apr 30, 2014 7:47am

    vladyn

    176 posts

    Yes - that was my default plan, but i just have few questions regarding that.

    I have upgraded a long list with plug-ins and they have running now on 2.8.1. I thought I can switch the database to copy of production, but I’m pretty sure the site will run whiteout any update scripts. Ho can I run these?
    by adding the installer directory back and pointing the to admin.php as per upgrade guide? Is there any chance this to work?
    Also besides the system and path variables that I need to change into that database - is there anything else that needs to altered?

    Rob, thanks for the advice. BTW what do you mean by standard update? Is it like changing admin.php from ee intall and adding back installer directory?

  • #4 / Apr 30, 2014 9:05am

    Rob Allen

    3105 posts

    You could try copying the production database over, but you will need to update all system files/addon files and theme files to 2.8.1 versions. When you have done both it should work in theory!

    Remember to backup and use your existing config.php and database.php files, and also update the system path in index.php/admin.php if you have changed it from /system

  • #5 / May 03, 2014 3:23pm

    vladyn

    176 posts

    I have running 2.8.1 a all add-ons updated and running.
    I tried to switch the databases with copy from production and uploading installer directory, but without success - it simply throwing tons of errors.

    I need somehow to runs the update scripts, which are altering the database from 2.1 to 2.8 I can see significant difference after these scripts are done.

    By simply copying the production database it’s not going to work even on theory.

    My other scenario, which will be much more harder is to copy working production Website, with files and DB running on EE 2.1.3, then following the update guide to replace files and run installer.

    This is not best case scenario however.

    Any other ideas?
    How to run the update scripts. which altering the database?

  • #6 / May 04, 2014 4:40am

    vladyn

    176 posts

    Actually what i did so far after the post above:

    I dumped the production and imported it into a newly created DB on staging
    I changed config/database.php to use it
    I changed the version number in config from 281 to 213 to simulate the system is not updated.
    I uploaded /system/installer and I pointed my browser to CP to run the update scripts.
    Update scripts came with some errors and somehow their changed my config to version 280.
    I manually changed it to 281 and walked through many system variables and setting. Also change some add-ons setting to be able to run the front-end.

    Front-end is running now as it was on my updated stage version. Off course there were a lot of errors and broken urls, since it uses copied .htaccess and some technique for removing the index.php that I’m not familiar with.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases