You can use this file to cron backup of MySQL databases in Year > Month > Day structured directory.
- First copy the file
mysql-backup.sh
into your server. - Change the
USER
,PASSWORD
or other options from the file and save it. - Change the file permission
sudo chmod +x mysql-backup.sh
- Now use
crontab -e
to set your cron job. If you are not sure what iscrontab
then search it on google.