Ubuntu 14.04 restore needed for automated (cron) backups

hitechelp wrote on Thursday, October 09, 2014:

Using the restore script for Ubuntu (found in /openemr/contrib/util directory works just fine for restoring a backup made using the web interface (Administration>Backup) although you must first edit line 175 to read “OEDIR=/var/www/html/openemr” which is the new www directory structure in 14.04. What would really be wonderful is if the automated (cron) backup that Brady has made available had such a restore script. The automated backup script located at http://www.bradymd.com/fullbackup4.sh works (with some minor adjustments) to produce a multi-session DVD that will hold a little over 4 gigabytes using standard +r DVD’s however, I have had no luck locating how to restore the encrypted files on it! Does anyone know the answer?

fsgl wrote on Friday, October 10, 2014:

After reading the steps, here, it seems that once the backup has been decrypted, then it’s a matter of restoring the openemr web directory & database.

The restore script from /openemr/contrib/util/ has the phpGACL component & may not work for Brady’s backup.

Did not read through script & the above are mere conjectures. El Jefe will need to correct misconceptions.

bradymiller wrote on Tuesday, October 14, 2014:

Hi,

The restore script won’t work with it. After decrypt and untar of the backup, there are two pieces (the openemr web directory and the openemr database), which need to be manually “placed”.

-brady
OpenEMR

hitechelp wrote on Tuesday, October 21, 2014:

Even if they were both decrypted and placed in the same directory as the restore script they still wouldn’t work? How are these different from the web interface backup files?

fsgl wrote on Tuesday, October 21, 2014:

Because the restore script does not work, one must paste the openemr web directory & restore the mysqldump file.

The built-in backup has the phpGACL dump, which is absent in Brady’s backup.

hitechelp wrote on Sunday, October 26, 2014:

So, does this mean a restore done manually from the encrypted backup produced using Brady’s automated backup will not have the phpGACL and corresponding config settings? Or is this not an issue? Reason being, I’m building a new server with identical hardware but adding expanded capabilities like UPS monitoring and shutdown, backup sync to remote location, and server messaging. Obviously once everything is installed, tested and running, I’ll restore a system backup to the new server and I’d like to avoid any surprises at the end of all that work. Hopefully using the --all-databases option in mySQL dump will take care of any issues related to phpGACL.

bradymiller wrote on Sunday, October 26, 2014:

Hi,

phpGACL in the past(prior to OpenEMR version 3.0.0) required separate installation and was in a separate database:
http://www.open-emr.org/wiki/index.php/PhpGacl

No need to worry about phpgacl on modern OpenEMR installations(since backing up OpenEMR itself will automatically backup the embedded phpgacl).

In your case, recommend making a bash script that does the “reverse” of the backup script for your restore script. After you figure out how to do the restore manually (only will take several lines on commandline) can then place them in a bash script. Same process (ie. place the commands to do it in a bash script) can be done to create automated backup/restore scripts to/from remote locations (rec looking into the rsync command).

-brady
OpenEMR