Cron : Daily backup

bubu

New member
Joined
Nov 16, 2008
Messages
2
Hi,

I am not sure to be in the good section.
I need your help to use Cron. I am sorry to bother you but I am completey disapointed.

My webservice provider use DirectAdmin
I'd like to save daily my huge database everyday and I have many questions.
Cron is certainely the best.
What extension the script must have? I've found some scripts but I am not sure of the extension? (I am running windows vista on my local pc)
Here's the script

Code:
#!/bin/sh 
  USER=xxxxx 
  PASS=xxxxxxxxxxxx 
  DESTINATION=/backup/daily/mysql 

  DATE=`date +%Y-%m-%d` 
  TIME=`date +%H:%M` 
  DAY=`date +%d` 
  DEL=`TZ=CST+24 date +%Y-%m-%d` 

  mysqldump -u $USER --password=$PASS base | gzip > $DESTINATION/base-$TIME.$DATE.sql.gz 

  rm -rf $DESTINATION/*.$DEL.sql.gz



Do you know a link to a good tutorial for a newbie user?
Do you know a good place with a script to save database daily?

Thanks for your help

Bruno
 
CrazyLane is correct. You do NOT need an extension on your script; it runs on the server, not on your Windows desktop. However you should have a complete server path to everything in your cronjob.

I haven't checked the contents of your cronjob. If you're not sure you should ask your hosting provider.

Jeff
 
Thanks a lot to bot of you
I'll test it tonight

If everything is fine, I'll post the source. This way that'll help newbie...
 
Back
Top