ideaman911 wrote on Monday, October 12, 2009:
BTW - as Brady notes, Windows has the ability to write simple batch files which will backup the needed sections of OpenEMR, and allow them to be restored to another machine quite simply.
The syntax is easy, and I suggest using a Daily approach which will result in seven days’ ability to go back to fix something. I also strongly urge that you use a network drive either instead of or in addition to your "master" so you have at least duplicate backup drives. We keep no fewer than five copies, because we are obsessive about data loss
All the Linux guys will tell you that my practice is risky because it violates MySQL rules. But it also works perfectly provided the backups occur while there is no write activity to the system. Since OpenEMR will log you out by default after six hours anyway, it is best to simply logout before you leave a workstation (which is a best practice for data security in any case).
The typical batch file looks like this:
rem Local Machine
xcopy c:\xampp\mysql\data\openemr\*.* c:\backup\mon\openemr\ /d /e /c /i /f /h /k /y
xcopy c:\xampp\htdocs\openemr\documents\*.* c:\backup\mon\documents\ /d /e /c /i /f /h /k /y
xcopy c:\xampp\htdocs\openemr\edi\*.* c:\backup\mon\edi\ /d /e /c /i /f /h /k /y
xcopy c:\xampp\htdocs\openemr\era\*.* c:\backup\mon\era\ /d /e /c /i /f /h /k /y
and you would replace the c:\backup… with d:\backup… for another network drive, and so forth, and "mon" with "tue" for the tuesday backups, etc… The "find and replace" function in your editor is brilliant for making this process a snap. You would make a set like this for each day, and set the scheduler on the "master" machine to run each on its respective day to make the backups.
If you have been working with 3.0.1 on machine "1", you would want an equal install on another machine, which we will call "2", and fully login with the startup password. You would then copy the directories "documents" and "edi" and "era" from the backup location to machine "2" at c:\xampp\htdocs\openemr and copy the "openemr" directory to machine "2" at c:\xampp\mysql\data to complete the "restore" to the "2" machine. (You will accept the overwrites for all). You should be able to login to that as though it were the "1" machine now.
If you upgrade, you must upgrade each machine identically, and then assure you do not try to restore a ver 301 data set to a 310 machine. To prevent that, I suggest you rename the "backup" directory(s) you were using as "backup301" as soon as you complete the upgrades, which will effectively create new "backup" directory structure(s) with the next time your backup occurs. That backup will now be the 310 version data, which will work fine with the 310 installs.
I hope that is clear as mud?
Joe Holzer Idea Man 315-622-9241 im@holzerent.com
http://www.holzerent.com