https://roadmap.sh/projects/database-backup-utility
The Database Backup Utility is a versatile tool designed to simplify the process of creating and restoring backups for various database management systems (DBMS). This tool is especially useful for developers and administrators who need a reliable way to manage database backups via a command-line interface.
- Multi-DBMS Support: Supports MySQL, PostgreSQL, and MongoDB out of the box.
- Automated Backups: Easily set up automated backups with configurable options.
- Command-Line Interface: Manage backups and restores using simple command-line commands.
- Flexible Storage Options: Store backups locally or in cloud storage solutions.
- Notifications: Receive notifications (e.g., via Slack) upon completion of backup or restore operations.
- Modular Architecture: Easily extend the tool to support additional DBMS or custom storage solutions.
- MySQL: One of the most popular relational databases, commonly used in web applications.
- PostgreSQL: A robust, open-source object-relational database known for its reliability and advanced features.
- MongoDB: A NoSQL database oriented towards document storage, widely used for handling large volumes of unstructured data.
- Download the Executable: Download the latest release of
DatabaseBackupUtility.exe
from the Releases page. - Prepare Configuration File:
- Create a
config.json
file in the same directory as the executable. - Example
config.json
:
{
"Database": {
"Type": "MySql",
"Host": "localhost",
"DatabaseName": "mydatabase",
"Username": "root",
"Password": "password"
},
"Storage": {
"LocalPath": "C:/Backups"
},
"Notifications": {
"SlackWebhookUrl": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
}
}
- Run the Tool:
- Open a command-line interface and navigate to the directory containing
DatabaseBackupUtility.exe
. - Execute commands to perform backups or restores.
To create a backup of your database:
DatabaseBackupUtility.exe --config config.json backup
To restore your database from a backup:
DatabaseBackupUtility.exe --config config.json restore
- Database Configuration: Specifies the database type, connection details, and credentials.
- Storage Configuration: Defines where the backups will be stored (locally or in the cloud).
- Notifications: Allows you to configure notifications, such as Slack messages, to be sent upon completion of operations.