22 Free MySQL/ MariaDB Database Backup Tools and Scripts

22 Free MySQL/ MariaDB Database Backup Tools and Scripts
Photo by Kevin Ku / Unsplash

MySQL is a popular open-source relational database management system (RDBMS). It is widely used for web-based applications and is known for its ease of use and scalability. MySQL is used by many popular websites, including Facebook, Twitter, and YouTube.

MySQL Backup is the process of creating a copy of the database to protect against data loss. Backing up your database is important because it provides a safety net in case of hardware failure, software bugs, or user error. Without a backup, it can be difficult or impossible to recover lost data.

The importance of backing up your database cannot be overstated. In addition to protecting against data loss, backups can also help with disaster recovery and testing. With a backup, you can restore your database to a previous state and recover lost data. Backups can also be used to test new features or upgrades without risking your live data.

In summary, MySQL is a popular open-source RDBMS used for web-based applications. MySQL Backup is the process of creating a copy of the database to protect against data loss. It is important to backup your database to protect against data loss, aid in disaster recovery, and facilitate testing.

In this post, we offer you a rich list of MySQL/ MariaDB backup scripts, and tools to use to backup your database for free.

1- MySQL backup

This is a shell script that allows you to back-up your MySQL databases to anywhere. You can dump and restore simply on the server, dump your database to a local filesystem, SMB server, connect to any docker container and backup your selected database from any container, and many more.

GitHub - databacker/mysql-backup: image to enable automated backups of mysql databases in containers
image to enable automated backups of mysql databases in containers - GitHub - databacker/mysql-backup: image to enable automated backups of mysql databases in containers

2- PHP Backup Utility

PHPBU is a PHP tool that creates and encrypts backups, syncs your backups to other servers or cloud services and assists you monitor your backup creation.

Features Highlight

  • Backup databases: ArangoDB, Elasticsearch, InfluxDB, Ldap, MongoDB, MySQL, Percona XtraBackup, PostgreSQL, Redis, and MariaDB.
  • Compress backup to bzip2, gzip, xz, zip.
  • Validate backups
  • Encrypting backups
  • Sync backups to other locations: Amazon S3, Azure Blob, Dropbox, FTP, SFTP, Yandex disk and more
  • Webhook
  • Reporting
PHPBU: Open-source Free PHP Database Backup Utility
PHPBU is an essential PHP tool for anyone looking to create and encrypt backups, sync backups to other servers or cloud services and monitor backup creation with ease. One of its key features is its support for creating backups for a wide range of database engines, including but not limited
GitHub - sebastianfeldmann/phpbu: PHP Backup Utility - Creates and encrypts database and file backups, syncs your backups to other servers or cloud services and assists you monitor your backup process
PHP Backup Utility - Creates and encrypts database and file backups, syncs your backups to other servers or cloud services and assists you monitor your backup process - GitHub - sebastianfeldmann/p…

3- BackMeUp

An automated MySQL / MariaDB databases and files backup solution on *nix Machines using Amazon S3, WebDAV (ownCloud / NextCloud etc.), Google Drive and Dropbox.

This script does some simple tasks:

  • The script dumps all of your MySQL databases individually.
  • The script backs up all of your Web files (e.g: root path of all of your virtual hosts).
  • The script compresses your web-root and databases to a single archive.
  • The script uploads the compressed archive into a folder in your Dropbox account, Amazon S3 bucket, Mega.nz or to a WebDav solution such as OrnCloud/NextCloud Server.
  • If the method is set to dropbox, The script makes sure that you always have the newest Dropbox-Uploader script.
  • After the upload, the script cleans up the temporary files (dumps, the archive itself).
GitHub - Ardakilic/backmeup: BackMeUp: An automated MySQL / MariaDB databases and files backup solution on *nix Machines using Amazon S3, WebDAV (ownCloud / NextCloud etc.), Google Drive and Dropbox.
BackMeUp: An automated MySQL / MariaDB databases and files backup solution on *nix Machines using Amazon S3, WebDAV (ownCloud / NextCloud etc.), Google Drive and Dropbox. - GitHub - Ardakilic/backm…

4- Backup Scripts

Collection of backup scripts (sometimes just wrappers) for MySQL. Tools to enhance the MySQL Backup experience and make it easier (almost plug and play...almost!).

All the scripts take care of the retention policy (defined by the user), as followed:

  • For MyDumper: User will define weekly and daily retention times.
  • For Mysqldump: User will define weekly and daily retention times.
  • For Mysqlbinlog: User will define number of days that the binlog files will be keep it
  • For XtraBackup: User will define weekly and daily retention times.
GitHub - nethalo/backup-scripts: Short collection of backup scripts. Mostly on bash
Short collection of backup scripts. Mostly on bash - GitHub - nethalo/backup-scripts: Short collection of backup scripts. Mostly on bash

5- Arkiv

This is a simple yet powerful backup tool designed to back-up local directories and MySQL databases to Amazon S3, and Amazon Glacier.

Arkiv could backup your data on a daily or an hourly basis (you can choose which day and/or which hours it will be launched).
It is written in pure shell, so it can be used on any Unix/Linux machine.

GitHub - Amaury/Arkiv: Backup and archive tool.
Backup and archive tool. Contribute to Amaury/Arkiv development by creating an account on GitHub.

6- MySQLDump for PowerShell

Scripts to use mysqldump on Windows systems. It requires OpenSSL to run.

GitHub - alphatrl/powershell-mysqldump-scripts: Using PowerShell for MySQLdump
Using PowerShell for MySQLdump. Contribute to alphatrl/powershell-mysqldump-scripts development by creating an account on GitHub.

7- Backup Wizard

This backup wizard is a collection of scripts to easily customize the backups of files and databases. It guides the user through a series of questions and then creates a rsnapshot config based on their answers.

GitHub - gavuk/backup-wizard: Guided set up of backups using rsnapshot and mysqldump
Guided set up of backups using rsnapshot and mysqldump - GitHub - gavuk/backup-wizard: Guided set up of backups using rsnapshot and mysqldump

8- sql-backup - Backup your MySQL / MariaDB server!

Backup your MySQL / MariaDB server (structure, data, users, grants, views, triggers, routines, events).

GitHub - code-lts/sql-backup: Backup your MySQL/MariaDB server ( structure, data, users, grants, views, triggers, routines, events )
Backup your MySQL/MariaDB server ( structure, data, users, grants, views, triggers, routines, events ) - GitHub - code-lts/sql-backup: Backup your MySQL/MariaDB server ( structure, data, users, gra…

9- mysql-backup

This project is a fork from deitch/mysql-backup, with additional features to back up and restore additional resources along with the database backup.

The rationale behind this is that most applications also have additional resources that make part of the application that also needs to be backed up, not just the database. For example, a WordPress install.

It has the following features:

  • Backup and restore database and application files.
  • Backup to local filesystem, S3 or SMB server.
  • Scheduled backups.
  • Delayed backup process start: define a delay before doing the first backup, whether time of day or relative to container start time (in seconds).
GitHub - juanluisbaptiste/mysql-backup: Docker image to automate web application backups.
Docker image to automate web application backups. Contribute to juanluisbaptiste/mysql-backup development by creating an account on GitHub.

10- MySQLBackup (Windows/ Powershell)

MySQL Backups on Windows through XAMPP, WAMP or a Standalone MySQL Installation. These scripts use 7Zip command line to compress scripts and MySQL .Net Connector 6.8.8.

GitHub - evanlanester/MySQLBackup: MySQL Backups on Windows through XAMPP, WAMP or a Standalone MySQL Installation
MySQL Backups on Windows through XAMPP, WAMP or a Standalone MySQL Installation - GitHub - evanlanester/MySQLBackup: MySQL Backups on Windows through XAMPP, WAMP or a Standalone MySQL Installation

11- mysqlalldbbackup

A shell script that can take backup of all MySQL database separately and compress them in a folder.

GitHub - shahreare/mysqlalldbbackup: A shell script that can take backup of all mysql database separately and compress them in a folder
A shell script that can take backup of all mysql database separately and compress them in a folder - GitHub - shahreare/mysqlalldbbackup: A shell script that can take backup of all mysql database…

12- php-mysqldump

This is a primitive PHP alternative to the mysqldump cli tool. It is possible to export tables (with all rows) and views.

GitHub - snsttr/php-mysqldump: PHP-Script as alternative to the native mysqldump cli tool
PHP-Script as alternative to the native mysqldump cli tool - GitHub - snsttr/php-mysqldump: PHP-Script as alternative to the native mysqldump cli tool

13- myphp-backup

Perform simple and fast MySQL backup/restore using PHP. You can use it to dump a full database or only some tables.

It requires PHP 5.0.5 or later.

GitHub - daniloaz/myphp-backup: Simple and fast MySQL backups using PHP
Simple and fast MySQL backups using PHP. Contribute to daniloaz/myphp-backup development by creating an account on GitHub.

14- Gox

Painless backup (and restore) tool for MySQL based on xtrabackup from Percona.

GitHub - toorop/gox: Painless MySQL backup (and restore)
Painless MySQL backup (and restore). Contribute to toorop/gox development by creating an account on GitHub.

15- kube-backup

Utility container to backup databases and files from containers in a Kubernetes cluster. Currently, it can use kubectl exec to backup database and files from within containers and store the backup files in an AWS S3 bucket.

GitHub - whereisaaron/kube-backup: Kubernetes utility container to back up files and database from other containers
Kubernetes utility container to back up files and database from other containers - GitHub - whereisaaron/kube-backup: Kubernetes utility container to back up files and database from other containers

16- backup-action

Github Action to backup MySQL, MongoDB and PostgreSQL databases.

GitHub - valerianpereira/backup-action: 🗄️ Github Action to backup MySQL, MongoDB and PostgreSQL databases
🗄️ Github Action to backup MySQL, MongoDB and PostgreSQL databases - GitHub - valerianpereira/backup-action: 🗄️ Github Action to backup MySQL, MongoDB and PostgreSQL databases

17- GdprDump

This tool provides a command that dumps the contents of a MySQL database.

It is the equivalent of mysqldump, with additional features, at the cost of performance (PHP implementation). The main purpose of this tool is to create anonymized dumps, in order to comply with GDPR regulations.

Features:

  • Data converters (transform the data before it is dumped to the file).
  • Recursive table filtering.
  • Tables whitelist (only these tables will be included in the dump).
  • Tables blacklist (not included in the dump).
  • Dump options (compression, output type...).
  • Predefined configuration templates (Magento, Drupal, OroCommerce).
GitHub - Smile-SA/gdpr-dump: Utility that creates anonymized database dumps (MySQL only). Provides default config templates for Magento, Drupal and OroCommerce.
Utility that creates anonymized database dumps (MySQL only). Provides default config templates for Magento, Drupal and OroCommerce. - GitHub - Smile-SA/gdpr-dump: Utility that creates anonymized da…

18- MySqlBackup.Net

A tool to backup and restore MySQL database in C#/VB.NET/ASP.NET. It runs on MySql.Data.DLL, MySqlConnector.DLL and Devart.Express.MySql.DLL.

GitHub - MySqlBackupNET/MySqlBackup.Net: A tool to backup and restore MySQL database in C#/VB.NET/ASP.NET.
A tool to backup and restore MySQL database in C#/VB.NET/ASP.NET. - GitHub - MySqlBackupNET/MySqlBackup.Net: A tool to backup and restore MySQL database in C#/VB.NET/ASP.NET.

19- DbSync (PHP)

DbSync is a tool for efficiently comparing and synchronizing two or more remote MySQL database tables.

In order to do this without comparing every byte of data, the tool preforms a checksum (MD5, SHA1, CRC32) over a range of rows on both the source and destination tables, and compares only the hash. If a block is found to have an inconsistency, the tool performs a checksum on each half of the block, recursively (down to a minimum block transfer size), until it finds the inconsistency.

GitHub - mrjgreen/db-sync: PHP library with command line tool for efficiently syncing tables between remote MySQL databases
PHP library with command line tool for efficiently syncing tables between remote MySQL databases - GitHub - mrjgreen/db-sync: PHP library with command line tool for efficiently syncing tables betwe…

20- MysqlCG - Mysql Client Gui

A simple script to backup and manage MySQL databases.

GitHub - steffanjensen/MysqlCG: Mysql Client Gui for Bash
Mysql Client Gui for Bash. Contribute to steffanjensen/MysqlCG development by creating an account on GitHub.

21- Export MySQL database and Import it from a dump file in PHP

MySQL is a popular Linux-based database program. As a database, MySQL is a versatile application. It can be used for something as simple as a product database, or as complex as a WordPress website.

This package will help you export a MySQL database and import it from a dump file in PHP.

GitHub - vwedesam/Php-Mysql-Export-Import: Export MySQL database and Import it from a dump file in PHP
Export MySQL database and Import it from a dump file in PHP - GitHub - vwedesam/Php-Mysql-Export-Import: Export MySQL database and Import it from a dump file in PHP

22- Backup (MySQL, MariaDB, MongoDB, PostgreSQL)

Backup is an application to organize file and database backups. It supports compression, encrypted transfer, email reports and command execution before and after a process.

The included features are:

  • Simple configuration
  • Strong compressions (Bzip2, Gzip)
  • Supports MariaDB, MongoDB, MySQL and PostgreSQL databases
  • Supports Docker container
  • Execute commands before and after
  • Secure and encrypted transfers
  • Email reports
  • Shows backup size and duration
GitHub - bloodhunterd/Backup: Backup is an application to organize file and database backups. It supports compression, encrypted transfer, email reports and command execution before and after a process.
Backup is an application to organize file and database backups. It supports compression, encrypted transfer, email reports and command execution before and after a process. - GitHub - bloodhunterd/…