Migration of data from 6.0.0 to 7.0.0 possible?

Hello community,
I am mousling, an IT admin who “inherited” an elderly openemr installation from a former colleague. As the 6.0.0 installation is currently having some security issues on our site, I am searching for a solution to quickly and smoothly fix these issues. Currently openemr 6.0.0 is running on windows with Xampp 8.1.2.
My idea is now to install a new machine with the current version of xampp and openemr 7.0.0 and migrate the data from the old installation.
Is this possible or am I thinking to simple and more steps have to be taken?
This is no productive installation, it is only used for demonstrating and teaching purposes.

Thanks to all! Mousling.

Hello @F.Mousling welcome to the community!
Migrating data between servers is a topic that is frequently discussed in this forum.
The process has many aspects to consider so needs research to be sure you have them all covered. One may research other users’ enquiries into the topic by searching the forum posts with the magnifying glass at the top right of the forum screen of the browser.

image

I searched on ‘migrate data’ and found many results; two of which appear useful:

You might try other searches on variants of that term to see if you find posts more directly related to your situation.

Good luck, and welcome to the community!
Best- Harley

@F.Mousling , I was in a situation similar to yours not long ago. I had to update the database from oemr 5.0 to 7. I was on a linux server but the process is probably similar.

THe old oemr was on a virtual server so i made a spare copy of that VM before i stated just in case. Then i followed upgrade instructions for the software and database from here:
https://www.open-emr.org/wiki/index.php/OpenEMR_Upgrade_Guides

Basically i went through each upgrade from 5.0 up to 7. Then I did a mysql dump on the database and moved it over to the new server. The instructions say to do each upgrade, which is what i did. But i will say this. The script for upgrading the database to 7 had the option to upgrade from all previous version directly to 7. I didn’t do this. It might work. I’d only try this if you are comfortable making a back up of the database in case things went horribly wrong.

You mean we can upgrade directly from version 5.0 to 7 ?.. where can I find that script?

It is built into “sql_upgrade.php” already. Simply select your previous version 5.0.x from the dropdown list before beginning the version upgrade process. This is necessary, and actually a very well thought out option, because, for example, if you want to upgrade an old version 4.x site to 7.x, a LAMP stack on a current Linux OS will not run the obsolete version 5 code because of issues with the PHP libraries and modules. Note that you absolutely must back up your system & database before initiating any version upgrades so you have a restore point to fall back on in case something goes wrong. (and most likely when jumping multiple versions up like 4 → 7, or 5 → 7, you will find errors that need to be resolved before the upgrade completes successfully)

1 Like

Hi again. Reposting this message so it’s visible on the feed.


A co-worker and I are migrating from 5.0.2 to 7.0.2 via this upgrade guide (OpenEMR Upgrade Guides - OpenEMR Project Wiki) and we are running into issues with LAMP stack compatibilities with the versions of OpenEMR and MySQL (blank pages coming up due to PHP 7/8 compatibility, SSL certificate issues, hardware resource lacking, etc.) Ultimately I’d like 7.0.2 running with the absolute latest versions of Ubuntu 22.x, Apache, PHP and MariaDB. We are doing our migration in stages via VirtualBox VMs and saving snapshot exports of each upgrade. Any advice on what traps you have encountered and how to get around them? We’d like to cut the upgrade process short as much as possible because we have to do it all over again when we get the 7.0.2 working properly on the VM. The final production environment lives on AWS.

Thanks,

H

If you’re going to V7.0.2 anyway, then just set up Ubuntu 22 with PHP 8.1/8.2, & MariaDB 10.X
Make sure to configure MariaDB for the maximum possible resources available to it before starting any serious work on the database, especially if you have a large set of tables.
Import your database, and then test doing the version upgrade, pay attention to the output of your version upgrade routine, if there are schema or table issues, that’s where you’re going to see them.
Check database health and repair any errors you find prior to upgrading.
Watch out especially for table collation, make sure your DB structure is normalized before attempting the version upgrade.
One thing I found out the hard way, and was helped out by others on here, when it gets to the stage where it’s populating UUIDs for Version 7, the process may either time out, or just hang and stop executing, and you may have to run the version upgrade again multiple times from that point before it actually finishes completely.