Hashemian Blog
Web, Finance, Technology

Windows MySQL Full Backup Batch Script With Compression And Versioning

    ๐Ÿ“‚ Computers     #     ๐Ÿ—จ No Comments

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.


Your Comment

* Comments are subject to screening and manual approval.

Read Financial Markets  |   Home  |   Web Tools  |   Blog  |   News  |   Articles  |   FAQ  |   About  |   Privacy  |   Contact
Give a few Sats: 1GfrF49zFWfn7qHtgFxgLMihgdnVzhE361
© 2001-2024 Robert Hashemian   Powered by Hashemian.com