Backup Error

anonymous wrote on Monday, January 11, 2010:

Hello.  I am trying to perform daily backups of my database.   Here is the script that results…

Dumping OpenEMR database…
“rm -rf /tmp/openemr_web_backup; mkdir -p /tmp/openemr_web_backup/emr_backup; mysqldump -u “openemr” -p"0p3n3mr” -opt -quote-names -r /tmp/openemr_web_backup/emr_backup/openemr.sql “openemr”; gzip /tmp/openemr_web_backup/emr_backup/openemr.sql" returned 1:

Any thoughts on how to solve the problem?  I would hate to lose all of my patient data…

bradymiller wrote on Monday, January 11, 2010:

hey,

I’m assuming your using Microsoft Windows with OpenEMR version 3.1 . If this is correct, then install the most recent patch, and then try it again: http://www.openmedsoftware.org/wiki/OpenEMR_Patches

If my assumptions are wrong, or it doesn’t work for you, then post your operating system and OpenEMR version.

-brady

ideaman911 wrote on Monday, January 11, 2010:

Houston;

If you ARE using Windows and you still have a problem, a fallback kludge which works very well AS LONG AS YOU HAVE NO USERS ON DURING THE BACKUP is to use the windows (Command Com) XCOPY as a batch instruction.

You need to Xcopy the following directories:

…/mysql/data/openemr
…/openemr/edi
…/openemr/era
…/openemr/documents
…/openemr/custom/letter_templates  (where you replace the dash with an underscore, which will not display correctly here)

If you setup a batch to copy to a LAN server, and the scheduler with a separate batch file for each day, you can keep up to the past seven day’s copies, and the Xcopy will minimize demand on bandwidth.  But I reiterate, this violates MySQL protocol, and is ONLY safe if NOBODY can edit during the backups.  I do mine at 4 AM and we have nobody working then.

Joe Holzer    Idea Man    315-622-9241     im@holzerent.com
http://www.holzerent.com

anonymous wrote on Tuesday, January 12, 2010:

Thank you Brady and Joe for your responses.

I successfully installed the patch and tried the backup.  However, a file never starts downloading like it does on the online demo.

Here are the responses I get…

Dumping OpenEMR database…
Dumping OpenEMR web directory tree…

I’m gettin’ there…

bradymiller wrote on Tuesday, January 12, 2010:

hey,

Please confirm your operating system and OpenEMR versions. Which OpenEMR package did you install (Xampp, Appliance, etc.)?

-brady

anonymous wrote on Tuesday, January 12, 2010:

Windows XP, OpenEMR 3.1.  I’m not sure which package I installed - it was an install disk from EHR Live. 

bradymiller wrote on Tuesday, January 12, 2010:

hey,
Is openemr directory found at c:\xampp\htdocs\openemr ?
is mysql directory found at c:\xampp\mysql ?
-brady

anonymous wrote on Tuesday, January 12, 2010:

Hi Brady,

Yes, the openemr directory is at  ‘c:\xampp\htdocs\openemr’  .
Yes, the mysql directory is at  ‘c:\xampp\mysql’  .

bradymiller wrote on Tuesday, January 12, 2010:

hey,

Not sure what an install disk from EHR Live. They released the Xampp-openemr 3.1 package, so will assume this is what you have: http://www.openmedsoftware.org/wiki/OpenEMR_Downloads#Windows_OpenEMR_XAMPP_package

The backup should work without any modifications with the xampp package, so it is odd. Suggestions:
1) Remove browser cookies and try again.
2) Try on a different browser.

If still can’t get to work, give us your browser (firefox, explorer, etc.) and browser version and paste your error log here:
C:\xampp\apache\logs\error.log

-brady

anonymous wrote on Tuesday, January 12, 2010:

Thanks again for your help Brady.

I have tried the latest versions of Safari, Firefox, Chrome, and InternetExplorer.

I still get this error message…
Dumping OpenEMR database…
Dumping OpenEMR web directory tree…

I have looked for my error log and could not find it in the directory you gave me.  Here is a screenshot of the folder where the error log is supposed to be…

http://gallery.me.com/jinsoo.joo#100197

bradymiller wrote on Tuesday, January 12, 2010:

hey,

look in C:\xampp\apache\logs directory (it’s there on your screenshot). Should be an error.log file there. If not, post a screenshot of this directory.

-brady

anonymous wrote on Tuesday, January 12, 2010:

That was a screenshot of C:\xampp\apache\logs directory.  I must have clicked somewhere else on the screen so the ‘error’ folder was not highlighted.   But, what you see in the above screenshot shows the contents of that directory.

bradymiller wrote on Tuesday, January 12, 2010:

hey,

You are looking at the C:\xampp\apache\error directory in the screenshot
(I have xampp locally, so know what it looks like) (plus a sanity check tells me those filenames are for apache errors)

try the C:\xampp\apache\logs directory

-brady

anonymous wrote on Tuesday, January 12, 2010:

Hi, sorry about that.

The log text is VERY long, so I created a download link.  Here it is…

files.me.com/jinsoo.joo/46ha77

Thanks again for all of your help.

anonymous wrote on Wednesday, January 13, 2010:

Hi Brady,

Would it be a better for me to paste the text from the error log in a post?

-Jinsoo

bradymiller wrote on Wednesday, January 13, 2010:

Hey,

Just read through the error log, and it looks good. I’m perplexed. Will research a little more. Just to be sure, make sure you can download a backup from the 3.1 demo (with patch) here:
http://www.openmedsoftware.org/wiki/Development_3.1.x_Demo

Does anybody know if the xampp version EHRLive is giving out on their disk is the same as the XAMPP-OpenEMR version we are offering?

-brady

sunsetsystems wrote on Wednesday, January 13, 2010:

I’d suggest either asking EHRLive to answer questions about their distribution, or else download and install one from the OpenEMR project here.

Rod
www.sunsetsystems.com

anonymous wrote on Wednesday, January 13, 2010:

Hi again,

I spoke with tech support at EHR Live.  The install disk that we used is in fact the same as the XAMPP-OpenEMR version you are offering.

Also, they said that the backup feature still doesn’t work on the Windows version of OpenEMR even after the latest patch  (he tried it and it doesn’t work).  They said the online demo does work because it is on a Linux server.

They suggested that I  simply copy the XAMPP folder as a backup periodically.

Here are the steps that were suggested…

1- Shutdown ‘Apache’ and ‘MySQL’ background running services.
2 - Copy XAMPP folder into remote directory offsite.
3 - Restart the ‘Apache’ and ‘MySQL’ services.

Any thoughts?

ideaman911 wrote on Wednesday, January 13, 2010:

Hi;

Making a copy of the entire Xampp after install and after any patch or upgrade is smart, so you can fix anything which is broken by the upgrade.  But if you have a period when you CAN shut down the services, then you HAVE the period to use the Windows Xcopy functions as i noted earlier in this thread, and those can be done without shutting down services, and can be restored by simply replacing the default data in a new install.  My process has a “master” which is in the field, so the biller sees it only periodically when it is at a hotspot using our VPN.  Every night it does an Xcopy per above to its own backup locations (seven of them, one for each day of the week, selected by the scheduler which runs the batch file for that day) as well as to offsite storage and to other LAN servers similarly, PLUS it does an Xcopy to the “Server” which is accessed by the biller (herself remotely at another location, also using the VPN) for 90% of the info she needs for most of her work.  She only needs to connect to the “master” for the 10% of entering new patient data, uploading scanned documents, entering EOB data for the accounting, and sending the billing, which she does when the “master” is at a hotspot.  All the connects happen in the background with no effort by either, except that the VPN tells both when they are connected.

So until you find a better way, my process has worked flawlessly for more than a year, and requires almost NO remembering if the computers auto-sense and login to their respective LAN locations (with internet access) once established.  And the ONLY bandwidth which is used is for files which have actually changed since the last backup.

I freely admit it violates MySQL rules.  But IFF you have no user access during the backup, it works every time.  And was essential for the particulars of my client needs (she does house calls, ergo forget real-time connectivity).  Mind you, I freely admit to violating speed limits as well.  You can’t hope to teach people to drive fast unless you do so yourself.  And I am a Porsche Club Track Instructor Mentor.  Any questions?

Joe Holzer    Idea Man    315-622-9241     im@holzerent.com
http://www.holzerent.com  or  http://www.EMRofCNY.com

ideaman911 wrote on Wednesday, January 13, 2010:

Brady & Tony;

I thought this internal Backup in Windows was a done deal.  Houston seems to say otherwise.  I will test it in the 3.2 pre-release and let you know what I find.  But RESTORE still depends on Linux commands and I have not lost “the Force” quite yet :wink:

Joe Holzer    Idea Man    315-622-9241     im@holzerent.com
http://www.holzerent.com  or  http://www.EMRofCNY.com