I am trying to mysqldump from raspberry pi to a flash disk connected to it in case the pi goes nuts one day.
I try to use the following script to be executed every day at 13:35, saved as /etc/cron.daily/<dated data.sql>
35 13 * * * mysqldump -u root -p mypassword --routines=true --add-drop-database --databases db5 > /media/Glide/db5_ data '+%m-%d-%Y'.sql
/media/Glide is my Flash disk.
So far no luck. Any suggestions?
You may need to remove the file extension. So for example rename your myscript.sh file to myscript. Place your file into /etc/cron.daily directory and do a test run to see whether it will run:
$ run-parts --test /etc/cron.daily
If all is correct you should see your script in the output of the above command.