mysqldump and crontab(linux) [closed]

2019-09-25 04:12发布

I want to make an automatic backup of my database, so i wrote like this

00 10   * * *   root     mysqldump -u root -ppasswordD billing "/home/backup/database_`date '+%m-%d-%Y'`.sql"

But it is not working, any ideas please?

Thanks and regards,

1条回答
戒情不戒烟
2楼-- · 2019-09-25 04:33
00 10 * * * mysqldump -u root -ppasswordD billing "/home/backup/database_`date '+%m-%d-%Y'`.sql"

If it fails or produces any output then you will get a mail for root, read it with the command "mail" or read /var/log/cron.log ;)

查看更多
登录 后发表回答