We have a Windows Server running multiple WordPress sites on MySQL. We've always relied on plugins such as BackWPup to handle backups. But because multiple users have access to and maintain these sites, it's difficult to make sure that the backup plugins remain untouched and continue to function properly.
For that reason I decided to use a separate script on the Windows Server to nightly backup all the databases in one shot and then have another process pick up the backup files and store them remotely.
A simple .bat file running nightly did the job. the script also includes compression and versioning and it keeps n versions of the backups, deleting the older ones at the end of the run.
Of course there's more to a site backup thanย just the database, such as files and settings, but this script only focuses on the databases. I trust with some small tweaks this script can be used for MariaDB and/or in Linux.