In Windows, to dump MySql or MariaDB use mysqldump.exe here is a sample of a working .bat file:
This example creates a .zip file for every backup you make, retaining only 30 days for saving space, each file gets a date/timestamp and we use 7-Zip which is open-source.