I'm having an issue with an automatic mysqldump using cron. I have written the following (what I think) is very simple bash script. The database is very small and simple, and I already have automatic backups setup, I am just using this mysqldump as an extra backup.
So the issue is, that when I run this bash script everything happens just as normal, a file is created called PIS_Backup. However, when I run it through cron it creates the file, but the file is empty. The cron entry looks like this.
Thanks in advance.
Code:
#!/usr/local/bin/bash
mysqldump -u username -ppassword database_name > /root/mysql_backup/PIS_Backup
So the issue is, that when I run this bash script everything happens just as normal, a file is created called PIS_Backup. However, when I run it through cron it creates the file, but the file is empty. The cron entry looks like this.
Code:
0 0,12 * * * /root/mysql_backup/backup
Thanks in advance.