Jump to content

Archived

This topic is now archived and is closed to further replies.

albinoazn

CronJob Backup to Email

Recommended Posts

I am a complete noob when it comes to php. I'm also a complete noob when it comes to MySQL. I do know a little of the basics, just enough to piss me off. [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] .

What I'm wanting to do is make a script that makes a backup of an entire database once every week, and then the script automatically sends it to my email address. I have been told to use cronjobs, but then never got any support. I have no idea what cronjobs is, and would love to have someone help me out.

Sorry if this is in the wrong place, but I wasn't sure.

Thank you,
Jake Moore / albinoAZN

Share this post


Link to post
Share on other sites
[!--quoteo(post=373778:date=May 14 2006, 12:58 PM:name=albinoAZN)--][div class=\'quotetop\']QUOTE(albinoAZN @ May 14 2006, 12:58 PM) [snapback]373778[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I am a complete noob when it comes to php. I'm also a complete noob when it comes to MySQL. I do know a little of the basics, just enough to piss me off. [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] .

What I'm wanting to do is make a script that makes a backup of an entire database once every week, and then the script automatically sends it to my email address. I have been told to use cronjobs, but then never got any support. I have no idea what cronjobs is, and would love to have someone help me out.

Sorry if this is in the wrong place, but I wasn't sure.

Thank you,
Jake Moore / albinoAZN
[/quote]

cron is the scheduling demon in *nix. Using cron, you can execute shell commands at different intervals throughout the day. To do your backup, you could write a script, or program for that matter, and have the cron demon execute it every friday night if you wanted it to. [a href=\"http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/\" target=\"_blank\"]This link[/a] (htmlcenter.com) gives examples on how to create cron jobs. Most website control panels have plugins that allow you to create cron jobs. If you have shell access, you can create cronjobs from the shell.

Share this post


Link to post
Share on other sites
Yea, The cPanel has an a CronJob section, but at the moment, I am unable to get to my cPanel, My host is talking to the guys who own his server.

I was wondering if there was anyway to just have a script/program that can do it on it's own.

Share this post


Link to post
Share on other sites
In terms of having a script execute itsself at a certain time, your probably better off to wait and setup the cronjob. Have you thought about scheduling a task on your PC to execute the script on your server?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.