I created a new file "dbbackup" in /etc/cron.daily that contains a simple database backup script.
#!/bin/sh
mysqldump -h localhost -u user -p'passord' database_name > /var/www/sites/example.com/backups/db_backup_"`eval date +%u%m%Y`".sql
Now the problem is that this file is not being automatically run, I am fairly new to linux servers but from reading around I found that this is the location that you need to create your cron scripts, but for some reason it doesn't run it, maybe I need to tell CRON some how to run this file in the terminal does anyone know?
Thanks
Best Answer
A few things to do/check
/usr/bin/mysqldump ...
root:root
Look in /var/log/cron for error messages. The run parts script logs messages like
at the start and end of each job.
From the comments - it appears that cron was not running.
service crond status
and start if requiredservice crond start