I am trying to do a scheduled backup of a mysql database. The script I have works as intended when I run it directly like this
But if I let crontab run the script, either from /root/scripts or from /etc/periodic/daily it still produces the gzipped sql file but it is empty.
This is the contents of the script:
I'm probably missing something really silly here...
Code:
sh /root/scripts/glpi_backup
This is the contents of the script:
Code:
#!/bin/sh
mysqldump -u root glpi | gzip > /mnt/johnt01/glpi_backup/glpi_backup_`date +%d-%m-%Y`.sql.gz
I'm probably missing something really silly here...