Forum Moderators: mack

Message Too Old, No Replies

site backup

How to backup site and database

         

wildeyedfrank

10:32 am on Mar 10, 2005 (gmt 0)

10+ Year Member



I've been trying to figure out how to automatically backup my website (approx. weekly) and the supporting database (approx. daily).

Web Host supports Cron Jobs.

I tried to write a php cron job using the system() function I found in a post here...host application (vdeck) said the job didn't exist...and manually initiating it resulted in nothing.

For some reason I can't find hardly anything in my websearches for "cron" or "cron backup" with anything to clue me in on how to write the script.

Any help would be appreciated...this is the last big piece before going hot!

wheel

2:44 pm on Mar 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It sounds like maybe you're confusing cron and the program itself. You write the php program to do the backup. You should be able to run it from the command prompt (though you may need to put a dot slash in front of the program to run it, like this: ./programname.sh)

Then, once it's running, you insert it into the crontab file by typing in "crontab -e". You'll need to read on the syntax of that file, it's basically a half dozen or so placeholders that tell cron when to run the program (hourly, daily, weekly, etc) followed by the name of the program. Once the program runs independently, and you've inserted it into the crontab file, cron will run that program automatically at the time you specified in the file.

Unless I've oversimplified your concerns?