Is there a way to restore DB without damaging current openemr installation?

Situation
I had a AWS docker installation (7.0.1 patch 1) and I did a backup of DB. Now I have a new non-docker ubuntu-based installation (7.0.2) I did a restore, and openemr just stopped working so I had to erase ubuntu-based installation and reinstall again. Is there a way to restore without damaging new installation?

OpenEMR Version
I’m using OpenEMR version 7.0.2, old one was 7.0.1 patch 1

Browser:
I’m using: Chrome, sometimes Mozilla

Operating System
I’m using: MacOS Monterey 12.7.1

Search
Did you search the forum for similar questions? Nope.

Logs
Did you check the logs? In docker I dunno where to look DB logs
Was there anything pertinent in them? Just a couple of patients and doctors
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

Do you have data in your 7.0.2 install that you’re trying to merge with the data from your AWS backup? If so, I don’t know how to proceed…

Is your 7.0.2 install empty, and you’re just trying to restore your backup on your ubuntu box? If so, I would suggest setting up 7.0.1 patch 1 on your ubuntu installation, restore your database backup, then perform the update to 7.0.2 on your ubuntu box.

1 Like

After restoring database, openemr installation just stop working (always white screen, I always check for DB config but… all seems to be OK but for openemr is not right)

Sounds like your database keys reference is different than the file keys.
Before I tell you how to fix; Does this database restored belong to the same sites directory(openemr file structure) the database was exported from?

1 Like

From where it comes: Docker AWS installation

Destination: Ubuntu standard installation

Maybe if I just extract patient data and necessary stuff it would be useful for me (but not the right way to restore…?)

The database you restore must be from and use the same sixa and sixb encryption keys where you exported the database from.
So if you restore a database where the sixa and sixb keys were generated is different than the location of existing keys in sites/default/documents/logs_and_misc/methods then you will have decrypt issues.
If the file keys aren’t the same as the file keys used to encrypt say a config parameter, then decrypt will fail. So in the end the two file keys need to stay with the exported database.
Grab and copy the file keys from the location the exported database was generated.
You can delete the sixa and sixb keys and openemr will regenerate however you will lose anything that was encrypted with the original keys say a password stored in config . We don’t use these keys for openemr login password so deleting will allow you to login.

Again if this is production server, you need to use the same two keys from where you exported the database. Very important.
Brady Miller has several forum post on this subject you may wish to research.

1 Like