icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » All Things Techy » Site Maintenance » help with Automatic MySQL backups

Site Maintenance Program updates, securing your website, creating backups.

Reply
 
LinkBack Thread Tools Search this Thread
Old April 3rd, 2008, 8:41 PM   #1 (permalink)
Registered User
Seasoned Poster
 
Joined in Mar 2008
Lives in California
Hosted on SH126
35 posts
Gave thanks: 9
Thanked 0 times
help with Automatic MySQL backups

For the past few weeks, we have been using a Cron job to run a PHP script twice a week and backup a mysql database.
We followed this guide: Want to Backup your MySQL databases automagically? by Sam, and it worked great =)

But sometime in the past few days, the backup just stopped working =(
and we can't find an error log/message anywhere. (before, when there was
an error, the cron manager sent an email of the error, or made a file "error_log")

I think the php script still works fine, because when we move it to our public_html directory and browse to the page, the backup runs fine. Do you have any suggestions how/where we can find an error message? or any ideas what might be wrong =)

Thanks!

PS: the cron job is scheduled on our website (shared hosting plan)
and it is backing up a mysql database on our dedicated (surpass) server.
brianluau is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 4th, 2008, 6:36 AM   #2 (permalink)
Registered User
Comfy Contributor
 
nathon's Avatar
 
Joined in Sep 2007
Lives in ~root
111 posts
Gave thanks: 1
Thanked 12 times
Is the cron emailing you that it failed? The cron also might have disappeared and needs to be re-created. Also, be sure you aren't doing a lynx or curl.

Try
/usr/bin/php /home/USERNAME/public_html/filename.php

If you have SSH access you can also try the command above, if it works with SSH it should work via a cron.
__________________
I'm proud to say I never have and never will use vista
nathon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 10th, 2008, 2:12 PM   #3 (permalink)
Registered User
Seasoned Poster
 
Joined in Mar 2008
Lives in California
Hosted on SH126
35 posts
Gave thanks: 9
Thanked 0 times
Smile

Thanks.
We just deleted the cron jobs and re-added them and now they magically work again =P

Also, a question for Surpass: the database we're backing up is about 45 MB so when we first ran the backup script, it would get the error
"PHP Fatal error: Allowed memory size of _______ bytes exhausted..."
So we used ini_set("memory_limit","96M"); and kept increasing it until the script had enough memory and ran without error.

Is that okay? and what's the max memory_limit we can set?

Thanks again for the help
brianluau is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 10th, 2008, 2:21 PM   #4 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,651 posts
Gave thanks: 81
Thanked 128 times
Yes, that is fine. I would set it to:

PHP Code:
memory_limit 108M      Maximum amount of memory a script may consume (8MB
from this link to our PHP5/MySQL5 Upgrades php.ini: http://surmunity.com/images/thephp5%21/php.ini
__________________
Roxanne


Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On