views:

28

answers:

1

I'm a Windows user but I've been asked to write a script that runs on Linux that does automatic backup for the MySQL database. I know how to do the backup (using mysqldump) but I don't know how to write a script in Linux and how to schedule it to run daily. How can it be done ?

+1  A: 

Just a shell script? Bash should be easy enough for that:

http://www.gnu.org/software/bash/manual/bashref.html

http://tldp.org/LDP/abs/html/

As for the scheduling, you'll want to use cron:

http://en.wikipedia.org/wiki/Cron

David