I have checked in a couple of new scripts to support backup and restore of an OpenEMR installation. These are currently experimental, so caution is in order, especially for the restore. New files are:
The backup is a web script, assessible via the Administration menu of OpenEMR. It requires "superuser" permissions. It creates and sends a backup file for download by the web browser. The resulting file can be easily saved to a USB memory stick or other removable medium.
The restore is a bash shell script. It must be executed with root permissions, and takes the full path to the backup file as an argument.
These scripts will not work with WIndows (of course any efforts towards adding support for Windows would be greatly appreciated). I have been testing them with Ubuntu and Debian Linux.
hey,
This is huge. Haven’t tried it yet; plan to try it tomorrow after the CVS demo gets updated. From initial look at code, probably be useful to give the user option of manually entering the sql-ledger directory. I’ve been toying with the idea of moving a future openemr appliance version to ubuntu(it’s so much better supported than mandriva), but couldn’t figure out a way for old appliance users to upgrade; I think this script willl be part of the answer.
-Brady
hey,
Your restore script is even huger. If we released a backup of a complete new installation, couldn’t this be another mechanism to quickly install openEMR/sql-ledger/phpgacl on ubuntu/debian (you’ve even got flexibility on installation directories, database names/pass, and will crush the annoying database persistance bug)
very cool,
brady
Downloaded the script and used it to backup my openmr. Have not restored yet. Now I have a problem, I cannot work on a patient anymore. I can create new patients but cannot go to history, encounter or anything else. All the choices are grayed out. When I hover over the history button it points to left_nav.php.
I replaced the new left_nav.php file with the old one and I can get it to work. But the backup button goes missing!
Sorry didn’t specify, I am using openemr 2.9.0. I really am not very familiar with programming so could you please tell what modifications I need to do? I did a diff of the two files but the result was greek to me!
What you might do is look in the new left_nav.php for lines referencing backup.php. There’s only a couple of them. Insert those same lines into the same places in your current left_nav.php.
I can’t tell you for sure that will work, because I’ve not tested it with 2.9.0. But I think it will.
Feedback time! Did a restore on a system that only had apache installed on it, Ubuntu 8.04. The restore went fine with phpgacl restoration as well. But sql-ledger didn’t install. I had to apt-get it from the repositories. Comments?
I should have mentioned, the sql-ledger directory backup only works when SL is installed in a directory named “sql-ledger” that is a sibling of the OpenEMR directory. This is because the backup script doesn’t have any good way of knowing where it is in the filesystem.
I’m not going to worry about it because we’re getting rid of SL anyway.
I tested the backup script and it worked like a charm but I was thinking of making the job alot easier for users. Maybe addition of a cron script that when backup is run manually, it also runs another cron script which simply takes that file saved somewhere on the server and burns it into a DVD-RW which is placed in the server just for safety sake. Any thoughts??? A basic script would cater for this, I could do it if thats ok
Automated backup is a whole 'nother topic. Don’t underestimate the complexity of doing it right. One problem is that the documents directory can become huge, and eventually it may not be practical to back up to DVD or to copy the whole thing over a slow network (like the Internet) on every backup run. Backups via the Internet are desirable because some types of disasters such as fire or burglary can wipe out an entire location.
One solution I am using is rdiff-backup, which can copy just the things that have changed, and in addition can preserve previous versions so that it is possible to restore as of some specified prior date.
Yeah I understand but it could be setup for redundancy sake that u have a DVD rewritable back up and also an internet backup, the disc is reused each day and the backup is updated and it is replaced every month or week. I have considered things like time vault or flyback that simply focuses on specific locations on the system and saves changes to the file to a given location. I hope this can be implemented and even ingraphical form where it simply asks u for ur desired save location and runs it for you. Flyback is good for this u can check it out