A command-line application for quickly backing up databases. It supports exporting multiple databases in a single operation, runs asynchronously and is extremely fast. Outputs export information as each operation completes. Tested on moderate to large size databases without any problems.
- Export all your database in a single operation.
- Supports
mysql,postgresandsqlserver. - Runs asynchronously, and is extremely fast.
- Exclude selected databases from the backup.
- Prints exports sorted by duration in a colorized table.
-
Set the following environment variables:
DB_CONNECTION: The type of server. Usemysql,postgresorsqlserver.DB_HOST: The hostname of your server.DB_PORT: The port number of your server.DB_USERNAME: The username to use when connecting to your server.DB_PASSWORD: The password to use when connecting to your server.DB_EXPORTS: A comma-separated list of databases to backup. Use*to backup all databases.DB_FORGETS: A comma-separated list of databases to exclude from the backup.
-
Run the application:
cargo run
This utility depends on the following Rust crates:
serde: To deserialize the database configuration. Version: 1.0 with features: ["derive"]tokio: A runtime for writing reliable, asynchronous, and slim applications. Version: 1 with features: ["full"]tokio-util: Utilities for working with Tokio. Version: 0.7 with features: ["compat"]tokio-postgres: A native, asynchronous PostgreSQL driver. Version: 0.7tiberius: A native, asynchronous TDS implementation for Microsoft SQL Server. Version: 0.12dotenvy: To load the database configuration from environment variables. Version: 0.15mysql: To connect to the MySQL server and retrieve the list of databases. Version: 24.0.0colored: To colorize the output to the terminal. Version: 3cli-table: To print the list of databases in a neat table. Version: 0.4.9zip: Reading and writing ZIP archives. Version: 2futures: Zero-cost futures in Rust. Version: 0.3
Contributions are welcome! Please submit a pull request or create an issue on GitHub.
The MIT License (MIT). See License File for more information.