# Backups are not downloading

**URL:** <https://community.open-emr.org/t/backups-are-not-downloading/432>\
**Category:** Management and Administration\
**Created:** [January 2, 2012, 5:43pm UTC](https://community.open-emr.org/t/backups-are-not-downloading/432 "2012-01-02T17:43:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 2, 2012, 5:43pm UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/1 "2012-01-02T17:43:32Z")

</div>

**[ajperezcrespo](https://sourceforge.net/u/ajperezcrespo/)** wrote on [Monday, January 02, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#238d):

Hi,  
&nbsp; When a backup is run (Administrafion-\>Backup) the process seems to run correctly.&nbsp; In fact I can see the backup being created in the /tmp/openemr\_eb\_backup/emr\_backup.&nbsp; But it never download.

Any thoughts?  
Ubuntu 11.04  
Apache version 2.2.17  
MySQL version 5.1.54  
OpenEMR v4.1.0 (5)  
PHP version 5.3.5

Thanks  
Alfonso

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 2, 2012, 6:31pm UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/2 "2012-01-02T18:31:20Z")

</div>

**[tmccormi](https://sourceforge.net/u/tmccormi/)** wrote on [Monday, January 02, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#570b):

I have seen this happen as well, but I have not been able to pin down why.&nbsp; It’s like the java script to start the download dialog doesn’t fire.&nbsp;&nbsp;  
-Tony

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 3, 2012, 11:06am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/3 "2012-01-03T11:06:06Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Tuesday, January 03, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#b929):

Hi,  
Anything showing up in the php error log or the javascript error log. Also, is it happening on all browsers or a specific one? Also, is the script timing out?  
-brady

> **[OpenEMR](https://www.open-emr.org)**
>
> The world's leading open-source electronic medical record and practice management software.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 4, 2012, 2:14am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/4 "2012-01-04T02:14:02Z")

</div>

**[nursejeff](https://sourceforge.net/u/nursejeff/)** wrote on [Wednesday, January 04, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#5ddb):

I’ve had this problem since I posted it on Nov 7th.&nbsp; There is no error noted in the php error log.&nbsp; This happens with all browsers.

Jeff  
NP Health Clinic

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [April 30, 2012, 11:25pm UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/5 "2012-04-30T23:25:22Z")

</div>

**[nursejeff](https://sourceforge.net/u/nursejeff/)** wrote on [Monday, April 30, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#0f0a):

This error is persisting.&nbsp; Has anyone explored this further or been able to resolve this issue?&nbsp; Is there anything I can do to help solve this?

Thanks again.

Jeff  
NP Health Clinic

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [April 30, 2012, 11:44pm UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/6 "2012-04-30T23:44:24Z")

</div>

**[yehster](https://sourceforge.net/u/yehster/)** wrote on [Monday, April 30, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#f9e5):

I made some changes related to the backup process in January.  
[https://github.com/openemr/openemr/commit/12103ca25f93247bafdd25f7f51eedd3963bdb0f](https://github.com/openemr/openemr/commit/12103ca25f93247bafdd25f7f51eedd3963bdb0f)  
Not sure if those changes address your specific problems though.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [May 1, 2012, 1:38am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/7 "2012-05-01T01:38:20Z")

</div>

**[nursejeff](https://sourceforge.net/u/nursejeff/)** wrote on [Tuesday, May 01, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#0b2e):

Hi yehster,

It appears that this change had been made already.&nbsp; I just upgraded to patch 10 and I am still having the same problem.

Jeff  
NP Health Clinic

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [May 2, 2012, 8:16am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/8 "2012-05-02T08:16:35Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Wednesday, May 02, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#4a14):

Hi,  
How big is the backup file at /tmp/openemr\_eb\_backup/emr\_backup when it&nbsp; stops getting any bigger?  
-brady  
[OpenEMR](http://www.open-emr.org/)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [May 2, 2012, 2:54pm UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/9 "2012-05-02T14:54:46Z")

</div>

**[nursejeff](https://sourceforge.net/u/nursejeff/)** wrote on [Wednesday, May 02, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#05f5):

Hi brady

openemr.sql.gz = 4MB  
openemr.tar.gz = 1088MB

Jeff

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [May 5, 2012, 8:54am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/10 "2012-05-05T08:54:52Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Saturday, May 05, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#01cc):

Hi,  
So it never makes the emr\_backup.tar file then?  
I wonder if it’s related to a timeout from apache:  
[http://httpd.apache.org/docs/2.0/mod/core.html#timeout](http://httpd.apache.org/docs/2.0/mod/core.html#timeout)  
-brady  
[OpenEMR](http://www.open-emr.org/)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [May 7, 2012, 8:56pm UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/11 "2012-05-07T20:56:28Z")

</div>

**[nursejeff](https://sourceforge.net/u/nursejeff/)** wrote on [Monday, May 07, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#70ce):

There is a new&nbsp;&nbsp;&nbsp;&nbsp; emr\_backup.tar&nbsp;&nbsp;&nbsp;&nbsp; which is 1130MB in size in the&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /tmp/openemr\_web\_backup .

There is also two files under&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /tmp/openemr\_web\_backup/emr\_backup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; that are&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; openemr.sql.gz = 4MB&nbsp;&nbsp;&nbsp; and&nbsp;&nbsp; openemr.tar.gz = 1125MB .

Jeff

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [July 1, 2012, 5:23am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/12 "2012-07-01T05:23:58Z")

</div>

**[mschap](https://sourceforge.net/u/mschap/)** wrote on [Sunday, July 01, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#95be):

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).

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [July 1, 2012, 5:55am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/13 "2012-07-01T05:55:06Z")

</div>

**[mschap](https://sourceforge.net/u/mschap/)** wrote on [Sunday, July 01, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#83a9):

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

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [July 1, 2012, 7:11am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/14 "2012-07-01T07:11:46Z")

</div>

**[mschap](https://sourceforge.net/u/mschap/)** wrote on [Sunday, July 01, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#9b78):

Okay, I answered my own question as to what the problem is:&nbsp; in the php.ini file (just search for it)&nbsp; 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.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [July 2, 2012, 12:21am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/15 "2012-07-02T00:21:16Z")

</div>

**[tmccormi](https://sourceforge.net/u/tmccormi/)** wrote on [Monday, July 02, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#8c13):

Until it gets too big again.&nbsp; The demand backup via the browser is not a long term solution.&nbsp; 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&nbsp; called backup\_oemr.sh, would be easy to do a windows cmd shell version of it.

-Tony

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [September 22, 2012, 1:58am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/16 "2012-09-22T01:58:44Z")

</div>

**[nursejeff](https://sourceforge.net/u/nursejeff/)** wrote on [Saturday, September 22, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#300b):

I increased the max\_execution\_time but this did not fix the problem.

Jeff  
NP Health Clinic

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [September 22, 2012, 6:07am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/17 "2012-09-22T06:07:06Z")

</div>

**[tmccormi](https://sourceforge.net/u/tmccormi/)** wrote on [Saturday, September 22, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#14d1):

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.&nbsp;&nbsp; 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.

-Tony

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [September 22, 2012, 8:11am UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/18 "2012-09-22T08:11:33Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Saturday, September 22, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#7bf9):

Hi,

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:  
[http://www.open-emr.org/wiki/index.php/OpenEMR\_Backup\_Tools](http://www.open-emr.org/wiki/index.php/OpenEMR_Backup_Tools)

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:  
[http://sourceforge.net/projects/openemr/forums/forum/202505/topic/5789277](http://sourceforge.net/projects/openemr/forums/forum/202505/topic/5789277)

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)

-brady  
[OpenEMR](http://www.open-emr.org/)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [September 22, 2012, 3:55pm UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/19 "2012-09-22T15:55:23Z")

</div>

**[rdh61](https://sourceforge.net/u/rdh61/)** wrote on [Saturday, September 22, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#f924):

Final size of directories / files:

emr\_backup:&nbsp;&nbsp;&nbsp;&nbsp; 7.9 MB  
openemr.sql.gz:&nbsp;&nbsp;&nbsp;&nbsp; 1.1 MB  
openemr.tar.gz:&nbsp;&nbsp;&nbsp;&nbsp; 6.8 MB

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [September 22, 2012, 4:15pm UTC](https://community.open-emr.org/t/backups-are-not-downloading/432/20 "2012-09-22T16:15:21Z")

</div>

**[rdh61](https://sourceforge.net/u/rdh61/)** wrote on [Saturday, September 22, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/2a87885a/#b8ed):

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:

```
set_time_limit(0);

```

The backup&nbsp; now completes successfully.

[Next page](https://community.open-emr.org/t/backups-are-not-downloading/432.md?page=2)
