Jump to content


Photo

CronJob Backup to Email


  • Please log in to reply
4 replies to this topic

#1 albinoazn

albinoazn
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 May 2006 - 04:58 PM

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

#2 _will

_will
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 14 May 2006 - 05:54 PM

[!--quoteo(post=373778:date=May 14 2006, 12:58 PM:name=albinoAZN)--][div class=\'quotetop\']QUOTE(albinoAZN @ May 14 2006, 12:58 PM) View Post[/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.

#3 albinoazn

albinoazn
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 May 2006 - 06:20 PM

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.

#4 _will

_will
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 14 May 2006 - 07:22 PM

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?

#5 albinoazn

albinoazn
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 15 May 2006 - 12:02 AM

Ok, I'll do it via the cpanel, any instructions on this?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users