Hashemian Blog
Web, Finance, Technology

Windows MySQL Full Backup Batch Script With Compression And Versioning

by @ 12:14 pm
Filed under: computers — Tags:

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.

MysqlFullBackup.bat

No Comments »

 

* Comments are subject to screening and manual approval.

Powered by


Read Financial Markets  |   Home  |   Blog  |   Web Tools  |   News  |   Articles  |   FAQ  |   About  |   Privacy  |   Contact
Donate Bitcoin: 1GfrF49zFWfn7qHtgFxgLMihgdnVzhE361
paypal.me/rhashemian
© 2001-2021 Robert Hashemian   Powered by Hashemian.com