Create a cron.sh file with this content:
mysqldump -u root -p{PASSWORD} DBNAME 2>> "/filename_`date '+%Y-%m-%d'`.sql"
And grant read permission or full permission for this cron.sh file.
and add this line to the crontab file ($ crontab -e)
0 0 * * * cron.sh
Kumara
source share