HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Web backups (http://www.howtoforge.com/forums/showthread.php?t=59434)

tio289 6th November 2012 10:14

Web backups
 
Hello, I on latest SVN version and I try to use web backups. I set period "daily" and copies to "7".

When I look on disk, backups was created, but not inserted in DB web_backup table. I added logs to cron_daily.php and it generate sql queries, which are correct. Problem is probably in $app->db, which not execute these queries.

Many times it insert only query for 1. web, other time for first 5 webs...If some queries is inserted, them it inserted two times, because was called $app->db and $app->dbmaster. So I solve this problem by comment out $app->dbmaster .

First problem persists.

till 6th November 2012 10:19

This has been fixed already in the current beta which is available in this forum, the svn trunk which you seemed to use does not contain latest code for the 3.0.5 release. If you want to get the latest code, then check out the stable branch for the 3.0.5 release.

tio289 6th November 2012 10:44

Hi, I switch on ispconfig-3.0.5 branch, duplicate entries was solved, but my firsts problem persists.

till 6th November 2012 11:03

It works here on my test server. Is this a multiserver system? If yes, did you choose to reconfigure permissions on master server during update?

Croydon 6th November 2012 12:07

It works on my servers (multiserver setup), too. So I think it might really be a permission problem.

tio289 7th November 2012 20:36

Hi guys, I was finally figure out problem:

it was with mysql connection timeout. I set wait_timeout and interactive_timeout to small values (60s), because many sites,cms etc. don't correctly close connections.

ispconfig backup script is running long time and mysql close connection. So I contribute path:

/usr/local/ispconfig/server/lib/classes/db_mysql.inc.php

Code:

105 105        public function query($queryString) {
    106                parent::ping();
106 107        $this->queryId = parent::query($queryString);

ping check for connection and if lost and mysqli.reconnect is enabled them reconnect it.

So enable reconnect in /etc/php5/cli/php.ini

Code:

mysqli.reconnect = On
Here is question if is not better to have custom php.ini for ispconfig cronjobs, which will have preddefined values, because backup files have UTC time by default. I have to set timezone also.

It's working now :)

I also edit cron job, I change nice and ionice, because backuping is intensive task

Code:

30 00 * * * /usr/bin/nice -n19 /usr/bin/ionice -c3 /usr/local/ispconfig/server/cron_daily.sh > /dev/null 2>> /var/log/ispconfig/cron.log
I don't know, what is better:

Calling ping direct in query function, or call it in long time scripts before every query?
Changing nice and ionice for whole cron_daily.sh or only in backup section when calling zip/tar/gzip commands?

falko 8th November 2012 16:51

Thanks a lot! I've added this to our bugtracker. :)

abdi 7th January 2013 11:51

Falko: do we have yet a feature in the upcoming version of API to initiate backup download. IE, in the control panel when you click download backup file, it's then pushed to the backup folder in the root of a domain name.

Thanks


All times are GMT +2. The time now is 22:44.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.