Trying to restore a backup (openemr 4.1.0 (recent upgrade from 3.2) on Ubuntu 10.10, I get the following error:
robert@robert-workdesk:~$ sudo ./restore
password for robert:
WARNING: This script is experimental.
It may have serious bugs or omissions.
Use it at your own risk!
Now you will be asked for the backup file.
By default this is named emr_backup.tar, although you may have saved it as something else.
Enter path/name of backup file: /home/robert/emr_backup.tar
Extracting /home/robert/emr_backup.tar …
tar: Substituting `.’ for empty member name
Extracting /tmp/emr_backup/openemr.tar.gz …
Do you want to specify new locations and database names for the restore? n
Error: The OpenEMR directory path ‘$webserver_root = dirname(dirname(__FILE__));’ does not start with ‘/’.
robert@robert-workdesk:~$
On the page you refer to I don’t understand the last 2 sections (Open phpMyAdmin, Restore openemr database). Please could you spell out what to do here for linux (ubuntu)?
There are two parts to OpenEMR; the website directory and the mysql database.
The website directory is saved in the openemr.tar.gz file, so all you basically need to do is unpackage this in the website directory; if using ubuntu then at /var/www/openemr .
The mysql database is a bit more complicated. The steps include:
1. Creating a mysql database (use same name as in the /var/www/openemr/sites/default/sql_conf.php file)
2. Creating a mysql user that has privileges to modify the above database (set the user and password that are in the /var/www/openemr/sites/default/sql_conf.php file)
3. Unpackage the openemr.sql.gz file and then import it into the database created in step 1
Might be an easier solution. Where did the restore script come from? Kinda sounds like it is not the release 4.1.0 version. Be sure to use the restore from the same version that you backed up.
Ah, how easy it is to overlook these things (dammit!), you’re spot on.
When I used the correct restore script I still got an error message:
Error: Site ‘default’ already exists in ‘/var/www/openemr/sites’.
However, by removing the ‘default’ folder, I could get the restore to carry through (a new ‘default’ folder was created), and my database is now working.
The error about the site already existing indicates you were restoring on top of an existing OpenEMR web directory, in which case the default site would also already exist. That should be fine if that existing directory is also from the desired release… normally you only restore on top of an existing directory if you are restoring the second site or beyond of a multi-site installation.