I have been trying to dump my Elgg2.3 production database to Elgg3.2 development database. But it's unsuccessful. I followed the recommended approach on Elgg documentation - http://learn.elgg.org/en/stable/contribute/database.html. I don't know what I did wrong. Any advice would be greatly appreciated. Below were the steps of my attempt.
1. Getting production data from Elgg2.3.7 - mysqldump old_database > production.sql
2. Importing production data to Elgg3.2 - mysql new_database < production.sql
3. Installing Phinx via composer in my webroot directory and running vendor/bin/phinx init there to create phinx.yml file
4. Executing migration file in webroot directory - vendor/bin/phinx migrate -c vendor/elgg/elgg/engine/conf/migrations.php
Nothing changes in my database and this was the error I got from running #4 - p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px 'Times New Roman'; color: #000000; background-color: #fcf8ff} span.s1 {font-variant-ligatures: no-common-ligatures} "warning no environment specified, defaulting to: prod".
I am opened to try other approaches as well. Please advise.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Jerome Bakker@jeabakker

Jerome Bakker - 0 likes
- seri_ng@seri_ng

seri_ng - 0 likes
- seri_ng@seri_ng

seri_ng - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 0 likes
- iionly@iionly

iionly - 0 likes
- take production site database (2.3) + its data directory (+ install directory) and create a new Elgg 2.3 installation with it (see http://learn.elgg.org/en/2.3/admin/duplicate-installation.html).
- now upgrade this Elgg 2.3 installation to Elgg 3.2 (http://learn.elgg.org/en/3.2/admin/upgrading.html). I never tried it myself but as far as I know you should be able to upgrade directly from 2.3 to 3.2 (though you might want to keep in mind that 3rd party plugins not yet available for Elgg 3 will very like not work unchanged).
- seri_ng@seri_ng

seri_ng - 0 likes
You must log in to post replies.Did you first have a look at http://learn.elgg.org/en/stable/admin/backup-restore.html
That tells you the steps to restore an installation on a different server
Your step 3 is not needed.
Thanks Jerome! No I didnt' read about 'Backup and Restore'. I am going to read it.
Jerome, after reading the documentation on 'Backup and Restore', I couldn't find any answers to solve the database migration from Elgg2.3.7 to Elgg3.2 that I have. I just wanted to clarify my situation. I dont have an issue with backing up nor restoring my production database. The problem I have is migrating Elgg2.3.7 database schema with data to Elgg3.2 schema.
I thought running vendor/bin/phinx migrate -c vendor/elgg/elgg/engine/conf/migrations.php after dumping production data will automatically update Elgg2.3.7 schema to Elgg3.2. But it doesn't work. I don't know if I miss important steps.
What's the reason to use export/import DB instead of upgrading Elgg?
I would suggest to separate the migration from the upgrade:
That's a good point RvR and iionly!! I don't know why I tried to install clean Elgg3.2 and then migrate my production database to the Elgg3.2 database.
I am going to duplicate my production website and run the upgrade from Elgg2.3.7 to Elgg3.2 on the duplicate version.
Thanks guys!