Automatic MySQL database backups and zipping on windows with a bat file
Need to backup all your databases on a MySQL windows server? Red Olive have created a simple windows batch file to export all database tables and zip, including deleting older backups! It’s quite simple to setup look at their website.
https://www.redolive.com/utah-web-designers-blog/automated-mysql-backup-for-windows/
Their version is configured for a US date/time format, I am in the UK with UK based date/time formats, I have made a modified version of the script available below.
You should setup a scheduled task to run the bat file on a regular interval, the more often you perform backups the easier it will be for you if there is a failure and you require to restore a backup.
We also advise you look at a process for storing backups at remote location, if you backup to a Dropbox folder your backups will be uploaded to the cloud, protecting you if the server dies or has disk failure!