I'm trying to setup a automatic database backup using cron jobs in cpanel that will be emailed to myself, but running into some problems. Currently I have tried 2 different solutions, but getting similar errors.
First I tried this http://www.theblog.ca/mysql-email-backup which is to create a PHP script to be run by a cron job. But I get the error mysqldump: Can't read dir of '/etc/my.cnf.d' (Errcode: 2)
Then I tried this one http://www.canbike.org/information-technology/hostgator-wolfcms-automatic-mysql-backup.html which is simply running this cron job
mysqldump -e --user='<USERNAME>' --password='<PASSWORD>' <DATABASENAME> | gzip | uuencode <FILENAME>.gz | mail <EMAIL>
However then I get /usr/local/cpanel/bin/jailshell: uuencode: command not found
mysqldump: Can't read dir of '/etc/my.cnf.d' (Errcode: 2)
I am on a shared host and did not setup MySQL myself.
So any ideas how I can get one of these to work or even a better solution?