| Site Maintenance Program updates, securing your website, creating backups. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#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. |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Comfy Contributor
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 |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Seasoned Poster
Joined in Mar 2008
Lives in California
Hosted on SH126
35 posts
Gave thanks: 9
Thanked 0 times
|
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 ![]() |
|
|
|
|
|
#4 (permalink) |
|
URB4N 5K1LLZ
Super #1
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:
|
|
|
|