Problem restoring backup

I cannot restore a backup to a new docker installation.

OpenEMR Version
I’m using OpenEMR version 7.0.2.

I’m using: Mozilla Firefox Version 122.0.

Operating System
I’m using: Linix Mint 21.3.

Please see here (it is self-explanatory):

robert@robert-ideacentre-AIO-520-22IKU:~$ cd ~/Downloads
robert@robert-ideacentre-AIO-520-22IKU:~/Downloads$ cd /emr_backup
bash: cd: /emr_backup: No such file or directory
robert@robert-ideacentre-AIO-520-22IKU:~/Downloads$ cd ~/Downloads/emr_backup
robert@robert-ideacentre-AIO-520-22IKU:~/Downloads/emr_backup$ gzip -d openemr.sql.gz
robert@robert-ideacentre-AIO-520-22IKU:~/Downloads/emr_backup$ docker ps
CONTAINER ID   IMAGE                   COMMAND                  CREATED       STATUS          PORTS                                                                      NAMES
0e1461f59d70   openemr/openemr:7.0.2   "./"           9 hours ago   Up 31 minutes>80/tcp, :::80->80/tcp,>443/tcp, :::443->443/tcp   openemr_openemr_1
robert@robert-ideacentre-AIO-520-22IKU:~/Downloads/emr_backup$ docker cp /home/$USER/Downloads/emr_backup/openemr.sql 0e1461f59d70:.
Successfully copied 73.4MB to 0e1461f59d70:.
robert@robert-ideacentre-AIO-520-22IKU:~/Downloads/emr_backup$ docker exec -it 0e1461f59d70 /bin/bash
OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown
robert@robert-ideacentre-AIO-520-22IKU:~/Downloads/emr_backup$ docker exec -it 0e1461f59d70 /bin/sh
/var/www/localhost/htdocs/openemr # mysql -uroot -proot openemr < openemr.sql
/bin/sh: can't open openemr.sql: no such file
/var/www/localhost/htdocs/openemr #

P.S. When /bin/bash failed I tried /bin/sh, which seemed to work, but the next step failed with “can’t open openemr.sql: no such file”.

I realise I did not have mariadb installed and had used the container id of openemr. So I installed mariadb and continued to follow the instructions here from point 4 onwards. All apparently OK until step 11 ("run the upgrade script even though not “upgrading” :); go to localhost/sql_upgrade.php in your browser "). But my browser tells me 404 Not Found.

Help still needed please.

Well, this isn’t a problem with the recovery process, this is just a problem copying files into the container. Use ls and look around with the tree – maybe you copied it to the top level. Try copying other files into the container, or if there’s volumes being shared in, just leave the SQL backup in one and then look there.

1 Like

Thank you for your response.

I am afraid it assumes a level of literacy that is beyond me.

I am a day-to-day user, a medical man in a single practice. I am not an IT guy.


Hang in there Robert. While it may take a minute to learn some of the basics of docker, it is a worthwhile effort in the end and you may find it fun too, eventually.:slight_smile:

I suggest doing a web search for docker commands and look for operating with containers. It is fairly easy once you have the tools.

Good luck and perhaps Asher has further comments.

Thanks for the suggestion but I need to get this up and running now. I need to see my patient’s records, update them and add new ones now. In the meantime I also have to see patients.

What about this? Get rid of the whole installation, docker, database and all, off my system completely, and start over from scratch. Can someone tell me how to do that, please?

So you’re hosting the instant locally?

That’s right, yes, locally.

Update @jesdynf @sjpadgett

I now have it working. I uninstalled docker and mariadb, manually removed all remaining docker files, installed again from scratch, then went through the restore process again carefully to avoid my previous error.

Thank you for your help.