Topic: Solved: Backup does not complete

I'm running into a strange problem regarding backups. When I click Create Backup, I get the status bar for a few seconds, then that disappears and the process has clearly ended with neither an error or completion message. However, no backup file is shown in the backup list (I checked the backup directory and confirmed that it contains no new backup file). I see no error messages in any log (apache, mysql, etc.).

This is relatively recent; until about a week ago (long after I last updated Frontaccounting), I was able to successfully create, save, and restore backups.

I'm running front accounting 2.3.25 on Ubuntu 14.04 LTS with MySQL 14.14, Apache2, and PHP 5.5.9.

I suspect this is not a front accounting problem (other than the lack of error messages), but I'm hoping someone has some insight into what might be happening or some suggestions on troubleshooting the problem.

Thanks in advance for any insight you can provide.

Last edited by rlhamilton (05/15/2017 08:51:26 pm)

Re: Solved: Backup does not complete

When the backup file size becomes big, the php.ini's settings and script timeout values may begin to matter. What was the size of your last backup - with and without compression? Check to see if this is on the threshold of the php.ini and apache conf settings.

Re: Solved: Backup does not complete

Thanks for the suggestion. Timeouts are not an issue, but the backups are close to 1MB, compressed, just over 6MB uncompressed.

It turns out that the memory_limit in php.ini was just 8M, so I increased it to 32M, and the problem went away.

Thanks again for the quick response and the really useful suggestion.

Re: Solved: Backup does not complete

Hi, my backup is more than 2MB zipped and I have increased memory_limit in php.ini to 32M, yet backup still not working

Re: Solved: Backup does not complete

max_execution_time = 120
post_max_size = 8M
upload_max_filesize = 32M

Apache conf file:
http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody

If, for example, you are permitting file upload to a particular location and wish to limit the size of the uploaded file to 100K, you might use the following directive:

LimitRequestBody 102400

Other defaults hardcoded in FA are in the Wiki. In particular, refer the lines 562-566 in function db_export() in admin/db/maintenance_db.inc:

    // set max string size before writing to file
    $max_size = 1048576 * 2; // 2 MB
    // changes max size if value can be retrieved
    if (ini_get("memory_limit"))
        $max_size = 900000 * ini_get("memory_limit");

Re: Solved: Backup does not complete

Hello,

thank you for your reply but still not working.

Re: Solved: Backup does not complete

I trust you have restarted your webserver after changes to php.ini and apache conf files.
Hope you have table prefixes for your FA tables. Otherwise, all tables in your database will be attempted to be backedup and it will cause a sever resource issue.
Purge the FA cache in the company folders:

FA 2.3
company/#/js_cache/*.js

FA 2.4
company/#/js_cache/%/*.js

Re: Solved: Backup does not complete

apmuthu wrote:

I trust you have restarted your webserver after changes to php.ini and apache conf files.
Hope you have table prefixes for your FA tables. Otherwise, all tables in your database will be attempted to be backedup and it will cause a sever resource issue.
Purge the FA cache in the company folders:

FA 2.3
company/#/js_cache/*.js

FA 2.4
company/#/js_cache/%/*.js

I have followed the above but I am still having the issue of the status bar rotating for a few seconds, then disappears and the process ending with neither an error or completion message, but it's obvious no backup was created.

Here is something new I am experiencing, A message comes up once in a while in red stripe...

"Access to database has been blocked until database upgrade is completed by system administrator."

Re: Solved: Backup does not complete

Increase the company timeout from 600 (10 minutes) to 86400 (1 day) in Setup -> Company Setup..

The said message comes from line 256 of includes/session.inc
This happens when sys_prefs parameter 'db_ok' is not true (1) and $_SESSION["wa_current_user"] has become invalid due to a timeout.

Re: Solved: Backup does not complete

Thanks for your reply, I will get back to you soon.