Backups are not downloading

Help
Alfonso
2012-01-02
2013-11-19
1 2 > >> (Page 1 of 2)
  • Alfonso
    Alfonso
    2012-01-02

    Hi,
      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.

    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

     
  • Tony McCormick
    Tony McCormick
    2012-01-02

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

     
  • Brady Miller
    Brady Miller
    2012-01-03

    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
    www.open-emr.org

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

    Jeff
    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?

    Thanks again.

    Jeff
    NP Health Clinic

     
  • Hi yehster,

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

    Jeff
    NP Health Clinic

     
  • Brady Miller
    Brady Miller
    2012-05-02

    Hi,
    How big is the backup file at /tmp/openemr_eb_backup/emr_backup when it  stops getting any bigger?
    -brady
    OpenEMR

     
  • Hi brady

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

    Jeff

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

    Jeff

     
  • M S
    M S
    2012-07-01

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

     
  • M S
    M S
    2012-07-01

    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

     
  • M S
    M S
    2012-07-01

    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.

     
  • Tony McCormick
    Tony McCormick
    2012-07-02

    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.

    -Tony

     
  • I increased the max_execution_time but this did not fix the problem.

    Jeff
    NP Health Clinic

     
  • Tony McCormick
    Tony McCormick
    2012-09-22

    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.

    -Tony

     
  • Brady Miller
    Brady Miller
    2012-09-22

    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

    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

    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

     
  • Robert Hale
    Robert Hale
    2012-09-22

    Final size of directories / files:

    emr_backup:     7.9 MB
    openemr.sql.gz:     1.1 MB
    openemr.tar.gz:     6.8 MB

     
  • Robert Hale
    Robert Hale
    2012-09-22

    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  now completes successfully.

     
  • Brady Miller
    Brady Miller
    2012-09-22

    Hi rdh61,
    What OpenEMR version are you using? (that line should be there in 4.1.1)
    -brady
    OpenEMR

     
  • Robert Hale
    Robert Hale
    2012-09-22

    Ah… yes.

    I'm using 4.1.0-1.

    I should have looked at that to begin with, shouldn't I? Sorry to cause confusion.

     
  • Hi Brady,

    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.

    Jeff Guillory

     
  • Brady Miller
    Brady Miller
    2012-09-24

    Hi Jeff,

    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.

    -brady
    OpenEMR

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

    Jeff

     
1 2 > >> (Page 1 of 2)