I helped set up an OpenEMR 4.2.2 system on a Windows 7 computer for a rural clinic in Honduras. The computer they are using as a server has failed but the external backups exist. There was a complete (c:\xampp) backup made shortly after the system was set up in March and “daily” backups made every 30 minutes since. I adapted a backup script I found on this site to create the daily backups that I will include below. I coached the local physician to restore the “complete” backup to another computer and it does run but without the clinic data that has been added since the initial deployment. She ran the script to restore the latest daily back up from earlier today but gets errors when trying to bring the system backup.
After restarting apache and mysql and connecting via the browser, the following errors are reported:
ERROR: query failed: SELECT gl_name, gl_index, gl_value FROM globals ORDER BY gl_name, gl_index
Error: Can’t find file: ‘_\openemr\globals.MYT’ (errno: 2 “No such file or directory”)
C:\xampp\htdocs\openemr\interface\globals.php at 202:sqlSatement
C:\xampp\htdocs\openemr\interface\login\login_frame.php at 3:include_once(C:\xampp\htdocs\openemr\interface\global
The script that backed up essential files uses the following xcopy commands, the restore script puts the same back in place. Note backup_loc would be set to the external drive (f:\oemr and hoy would be the current day)
if exist %bkup_loc%%hoy%\openemr\ copy %bkup_loc%%hoy%\openemr c:\xampp\mysql\data\openemr
if exist %bkup_loc%%hoy%\documents\ copy %bkup_loc%%hoy%\documents c:\xampp\htdocs\openemr\documents
if exist %bkup_loc%%hoy%\edi\ copy %bkup_loc%%hoy%\edi c:\xampp\htdocs\openemr\edi
if exist %bkup_loc%%hoy%\era\ copy %bkup_loc%%hoy%\era c:\xampp\htdocs\openemr\era
if exist %bkup_loc%%hoy%\custom\letter_templates\ copy %bkup_loc%%hoy%\custom\letter_templates c:\xampp\htdocs\openemr\custom\letter_templates
I am here in the US and trying to help via phone so any help at all would be greatly appreciated -thanks