When a backup is run (Administrafion->Backup) the process seems to run correctly. In fact I can see the backup being created in the /tmp/openemr_eb_backup/emr_backup. But it never download.
Apache version 2.2.17
MySQL version 5.1.54
OpenEMR v4.1.0 (5)
PHP version 5.3.5
I have seen this happen as well, but I have not been able to pin down why. It's like the java script to start the download dialog doesn't fire.
I've had this problem since I posted it on Nov 7th. There is no error noted in the php error log. This happens with all browsers.
NP Health Clinic
This error is persisting. Has anyone explored this further or been able to resolve this issue? Is there anything I can do to help solve this?
I made some changes related to the backup process in January.
Not sure if those changes address your specific problems though.
It appears that this change had been made already. I just upgraded to patch 10 and I am still having the same problem.
How big is the backup file at /tmp/openemr_eb_backup/emr_backup when it stops getting any bigger?
openemr.sql.gz = 4MB
openemr.tar.gz = 1088MB
So it never makes the emr_backup.tar file then?
I wonder if it's related to a timeout from apache:
There is a new emr_backup.tar which is 1130MB in size in the /tmp/openemr_web_backup .
There is also two files under /tmp/openemr_web_backup/emr_backup that are openemr.sql.gz = 4MB and openemr.tar.gz = 1125MB .
I too am having this problem - worked up until the emr backup file reached a size above 493 MB (size of the last successful backup).
When I try to open the openemr.tar.gc file from the tmp folder I get the following:
gzip: stdin: invalid compressed data-crc error
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Okay, I answered my own question as to what the problem is: in the php.ini file (just search for it) increase the max_execution_time from its current setting to something a little more extreme like 1080 - this gives enough time and the back up will work fine.
Until it gets too big again. The demand backup via the browser is not a long term solution. You need to implement a automated backup script…
It's not hard, you need only use mysqldump to copy the database out to text and and kind of tar, zip, copy, rsync, xcopy to make a snapshot of it all and put it somewhere other than the same machine.
There is an linux example in contribs/util called backup_oemr.sh, would be easy to do a windows cmd shell version of it.
I increased the max_execution_time but this did not fix the problem.
I have found that using the backups via the web client, whether through the OpenEMR backup selection or via phpmyAdmin can fail, and frequently they fail silently on large databases.
The ONLY safe way to backup your database is from the command line with the mysql tables locked during the dump.
Use the examples provided in the contrib/util/backup_oemr.sh. If you are windows based either install cygwin so you have a unix shell command or convert the script to windows .cmd format.
Or… find a good mysql UI backup application tool that IS NOT browser based.
Since there is a rather large variety of combinations on backup methods, would be nice to get more details on backup methods on the wiki:
Also, to clarify (correct me if I am wrong), byt mysqldump by default has the -opt parameter on, which locks tables (so, as long as use this command with using any parameters to explicitly remove locks, should be fine; that being said, always good practice to include -opt in the command, which is done in backup method within OpenEMR).
The backup script should work (since it is utilizing mysqldump with lock and appropriate copy of the web files), but I think the main issue seems to be the download issues.
I agree with Tony (in a way). Ideally, the user implements a automated command line tool to backup their OpenEMR frequently and off site. However, the natural progression of new users will likely be to use the internal OpenEMR backup mechanism(ie. limit their initial resource investment) until they become comfortable to either implement a more sophisticated method (or hire somebody to do it). (This is where documentation on various backup methods in the wiki would be extremely helpful)
So, is is beneficial for this thing to work correctly. Also with bug in this script reported by:
To debug, curious to know in both Jeff and rdh61 cases the files/directories and sizes you see at /tmp/openemr_web_backup after running the backup script (note the files will keep getting bigger while the script is running, so wait until files stop growing)
Final size of directories / files:
emr_backup: 7.9 MB
openemr.sql.gz: 1.1 MB
openemr.tar.gz: 6.8 MB
Sorry, disconsider my last post. These were the sizes after attempting to back up with the browser, not manually using the script.
However, the problem for me has been solved by referring to yehster's post (nº 6) above.
In interface/main//backup.php, line 36 was empty. I added this code:
The backup now completes successfully.
What OpenEMR version are you using? (that line should be there in 4.1.1)
I'm using 4.1.0-1.
I should have looked at that to begin with, shouldn't I? Sorry to cause confusion.
Under Administration -> Backup -> I click on "Create Backup", it starts stating "Dumping OpenEMR database…", it takes approx. 1 min, then it states "Dumping OpenEMR web directory tree…", it stated one more message very quickly then the "File not found" error box pops up stating "Firefox can't find the file at https://myserver/openemr/interface/main/backup.php."
At this point a new file has been made under: /tmp/openemr_web_backup/emr_backup which is 1928MB in size named openemr.tar.gz and openemr.sql.gz which is 6MB in size.
On Ubuntu 10.04.4 LTS, was able to do that backup successfully, which had following with following filesizes:
/tmp/openemr_web_backup/emr_backup/openemr.sql.gz (154 MB)
/tmp/openemr_web_backup/emr_backup/openemr.tar.gz (2.5 GB)
(The downloaded file was 2.6 GB)
Note that the step where yours is breaking appears to be where the following file is created:
/tmp/openemr_web_backup/emr_backup.tar (which is basically the two files above archived together)
Are you seeing the emr_backup.tar file?
Note it could be something as simple as running out of disk space, since it is breaking at the place where it needs to build the main archive which essentially quickly doubles the hard disk usage (so, in your case about 4GB is used during the backup). Can follow disk space usage with the 'df -h' command.
Yes Brady, I am seeing an emr_backup.tar file under tmp/openemr_web_backup. It is 1966MB.
How and where do I add the 'df -h' command.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.