mysql failure with cron|Joomla Support|Forum Archive|XCloner

The free forums are no longer in use. It remains available as read-only archive.

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
The forums are currently locked and only available for read only access
sp_TopicIcon
mysql failure with cron
September 13, 2011
2:58 pm
Avatar
Emil
Illinois USA
Member
Members
Forum Posts: 7
Member Since:
September 13, 2011
sp_UserOfflineSmall Offline

I have been able to effectively run manual and cron backups on my 2 personal web sites.

I have been trying to perform an auto backup through cron on a clients website (this website is with Godaddy).

 

I took a manul backup a on this clients web site a few days ago, and am doing one again right now.

 

When I tried running with cron I get the following e-mail:

<center><font color='red' size='4'>Could not connect: Lost connection to MySQL server during query</font></center><center><font color='red' size='4'>Unable to select database thecity1</font></center><b>Using default configuration file</b><br />
<b>Starting /home/content/84/6215484/html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php</b><br />
<b>Starting XCloner for site http://www.thecity1.com at 2011-09-13 07:10</b><br />
<b>Creating a fullbackup</b><br />
<b>Generating Backup ...</b><br />
<br />
<b>Warning</b>:  mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in <b>/home/content/84/6215484/html/administrator/components/com_xcloner-backupandrestore/cloner.functions.php</b> on line <b>1921</b><br />
<br />
<b>Warning</b>:  mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: A link to the server could not be established in <b>/home/content/84/6215484/html/administrator/components/com_xcloner-backupandrestore/cloner.functions.php</b> on line <b>1921</b><br />
<br />

 

There are more errors but no need to show them.

nothing has been altered from the manual process.

What or where should I look.

September 14, 2011
4:40 am
Avatar
Ovidiu Liuta
Member
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Try and run a repair query through phpmyadmin on your database and see if you have anymore issues afterwards, if you do, you might need to contact your hosting support regarding that error as it seems the mysql server closes the connection prematurely

 

Ovidiu

September 14, 2011
12:14 pm
Avatar
Emil
Illinois USA
Member
Members
Forum Posts: 7
Member Since:
September 13, 2011
sp_UserOfflineSmall Offline

Did that.

 

I then ran a manual backup, it ran for about 50 minutes, produced a TAR file of just over 1.1 GB

the file is:

ftp://stephanievavra.....drop.1.tar

 

I just ran a cron backup (starting at 5 minutes after the hour)  it sent the following email:


<b>Using default configuration file</b><br />
<b>Starting /home/content/84/6215484/html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php</b><br />
<b>Starting XCloner for site http://www.thecity1.com at 2011-09-14 05:05</b><br />
<b>Creating a fullbackup</b><br />
<b>Generating Backup ...</b><br />

I see a database-sql.sql the size is 112 mb

the xcloneer.log file contains this:
Log output started
Log output finished
Log output started
Log output finished

September 15, 2011
6:46 am
Avatar
Ovidiu Liuta
Member
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

What cron command are you using? I would advise using the one with the php executable, like "php /pathto/cloner.cron.php" and see if it helps!

 

Ovidiu

September 15, 2011
12:29 pm
Avatar
Emil
Illinois USA
Member
Members
Forum Posts: 7
Member Since:
September 13, 2011
sp_UserOfflineSmall Offline

This is the cron command on the Godaddy account that is failing:

/web/cgi-bin/php -q /home/content/84/6215484/html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php

 

Here is the command on one of my sites (same command except  standard /usr/bin/php) this works without problem:

/usr/bin/php /home/nwilin5/public_html/adsfreemidwest.com/administrator/components/com_xcloner-backupandrestore/cloner.cron.php

and here is the output from it:

Set-Cookie: auth_clone=1
Content-type: text/html; charset=utf-8

<b>Using default configuration file</b><br />
<b>Starting /home/nwilin5/public_html/adsfreemidwest.com/administrator/components/com_xcloner-backupandrestore/cloner.cron.php</b><br />
<b>Starting XCloner for site http://www.adsfreemidwest.com at 2011-09-12 13:40</b><br />
<b>Creating a fullbackup</b><br />
<b>Generating Backup ...</b><br />
<b>    Archive Name: backup_2011-09-12_13-40_www.adsfreemidwest.com-sql-nodrop.tar
<br />
    Number of Files: 7942
<br />
    Size of Original File: 2259.83 MB
<br />
    Size of Archive: 2266.37 MB
<br />
    Database Backup: <b>nwilin5_adsfree:</b> Backup Completed ( 23.57 MB )
<br />
    ### END REPORT
    </b><br />
<b>Backup Done</b><br />
<b>Backup file: /home/nwilin5/public_html/adsfreemidwest.com/administrator/backups/backup_2011-09-12_13-40_www.adsfreemidwest.com-sql-nodrop.tar</b><br />
<b>Total backup size:2266.37 MB</b><br />
<b>Notification Mail was sent to [email protected]</b><br />
<b><br />

ALL DONE! I will exit now from cron.</b><br />

September 15, 2011
4:19 pm
Avatar
Ovidiu Liuta
Member
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Please check this article http://help.godaddy......cle/3483 , godaddy uses the $HOME variable instead of the full path to your webroot folder(html/), so i am guessing the new command would be

 

/web/cgi-bin/php5 $HOME/administrator/components/com_xcloner-backupandrestore/cloner.cron.php

 

Hope it helps! Ovidiu

September 15, 2011
5:58 pm
Avatar
Emil
Illinois USA
Member
Members
Forum Posts: 7
Member Since:
September 13, 2011
sp_UserOfflineSmall Offline

I was skeptical so I changed it as you suggest:

/web/cgi-bin/php -q $HOME/administrator/components/com_xcloner-backupandrestore/cloner.cron.php

 

Here is the response:

No input file specified.


That is the only thing I altered.

I then changed it back to:
/web/cgi-bin/php /home/content/84/6215484/html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php

but this time I left off the -q,  same result as easlier tests:
Set-Cookie: auth_clone=1
Content-type: text/html

<b>Using default configuration file</b><br />
<b>Starting /home/content/84/6215484/html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php</b><br />
<b>Starting XCloner for site http://www.thecity1.com at 2011-09-15 10:40</b><br />
<b>Creating a fullbackup</b><br />
<b>Generating Backup ...</b><br />
September 16, 2011
12:15 pm
Avatar
Ovidiu Liuta
Member
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Is that the full cron message? If so, probably the script is being stopped by the server, either a timeout or some other limitation. I would advise to either contact the hosting support and see if they can help with that, or try and exclude some of the larger files/directories from your site.

 

Try and check also the Tar Active checkbox, and see if it helps! Ovidiu

September 16, 2011
4:40 pm
Avatar
Emil
Illinois USA
Member
Members
Forum Posts: 7
Member Since:
September 13, 2011
sp_UserOfflineSmall Offline

I  checked the TAR box, then tried to run a manual backup, it gave me the JSON error again,

   I waited a while and just clicked on retry.

These are the files and sizes:

administrator/backups/backup_2011-09-16_07-04_www.thecity1.com-sql-nodrop.1.tar  2,147,245,056

administrator/backups/backup_2011-09-16_07-04_www.thecity1.com-sql-nodrop.2.tar  182,434,816

administrator/backups/backup_2011-09-16_07-04_www.thecity1.com-sql-nodrop.tar     1,758,332,928

 

There are no files in /administrator/components/com_xcloner-backupandrestore/administrator/backups

I then ran a cron job and got the same results as before:

Set-Cookie: auth_clone=1
Content-type: text/html

<b>Using default configuration file</b><br />
<b>Starting /home/content/84/6215484/html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php</b><br />
<b>Starting XCloner for site http://www.thecity1.com at 2011-09-16 09:15</b><br />
<b>Creating a fullbackup</b><br />
<b>Generating Backup ...</b><br />

I guess I will have to play with making multiple backups of different folders and the database.
 Do you have suggestions/documentation on how to do that.
September 16, 2011
5:57 pm
Avatar
Ovidiu Liuta
Member
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

The backups are stored inside the /administrator/backups/ folder under your site root by default.

 

Our full documentation is available here https://docs.xcloner.com/#/ either as pdf manual or as online wiki.

 

Ovidiu

Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 6
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
D: 21
Andy: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 738
Members: 10080
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Manuele Freddo_1
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0