MYSQL backup restore

I am trying to restore the OpenEMR data lost during system upgrade. I have sql file of the database exported through phpadmin interface. I install the OpenEMR and create database during the install process. After the installation I try to import the data from the old database in the new database, but it gives me error “table addresses already exists” and interrupts the import. I am able to create openemr empty database in phpadmin and import data from the old database into it, but it does not work with the OpenEMR installation.

OpenEMR Version
I’m using OpenEMR version 6.0.1 and also tried version 7.0.0

Google Chrome

Operating System
Ubuntu 20.04

hi @Vik , sounds like you’re on the right track. You have to drop the existing openemr database, create an empty database and then import.

I do this and as a result when I try to log in the OpnEMR I see an empty page. There is a miscommunication somewhere.

the keys in the documents logs and misc folder need to be restored as well

Thank you for your help!
How do I restore the keys in the document logs and misc folder?

copy them like the other documents from your backup of the documents folder under sites//documents/logs_and_misc/methods/key-names

Thank you so much. I simply copied the keys from the database created during the OpenEMR install in the New database with imported data and patient records started to show.
I have another problem now and would really appreciate a heads up. In my old system I have documents that I uploaded in the patient,s charts. I copied the sites defaults document content in the new install but the documents will not show up upon clicking on them. They are stored in numerated folders in /sites/ default/documents
When I try to open a file from these folders for instance 10_13_20 Page1.JPG I get:
Error interpreting jpeg file (not jpeg file: starts with 0x30 0x30)
Do you have any idea what the problem might be?

I have exported the mysql database, replaced the documents folder with the back up documents folder and now the system is working extremely slow. Do you have any idea what it could be? The documents in patients charts are still not showing

5 posts were split to a new topic: Aws cloud express db access