I am trying to make backup of mysql database autoatically using crontab but when I but the command directly int /etc/crontab file the backup created successfully
19 16 * * * root mysqldump -u root -prootroot -h192.168.4.5 radius | gzip > /etc/freeradius/nh.sql.gz
the above command work nice but when I but this command in file and execute the file from crontab the database can not be created this is the content of /etc/freeradius/backup.sh
mysqldump -u root -prootroot -h192.168.4.5 radius | gzip > /etc/freeradius/nh.sql.gz
and this is the content of crontab file
46 16 * * * root /etc/freeradius/backup.sh
but there is no any thing happen even if the command is executed as I saw in syslog file
46 16 * * * root /etc/freeradius/backup.sh > /path/mylogfile
.