Virtualmin Database Backup - Backup MySQL, Postgres, MongoDB, & SQLite (Host or Docker)

Hi everyone,

Following up on the Docker and File Backup modules I shared previously, here is the third module from the collection I’ve been working on: Virtualmin Database Backup.

Just like the file backup tool, I wrote this because the standard way of handling database backups on a server is usually a collection of fragile bash one-liners. Shoving raw passwords into a mysqldump script or piping stdout straight into gzip often causes problems—like silent failures that spit out empty gzipped files, credentials leaking into ps, or dangerous cleanup commands wiping the wrong directory.

This module addresses those gaps by bringing a secure, point-and-click UI to database administration.

What it does: It auto-detects your existing database engines—whether they are running directly on the host or isolated inside running Docker containers—and lets you manage safe, compressed, and encrypted backups from a single interface.

Main Features:

  • Five Engines Supported: Full management for MySQL, MariaDB, PostgreSQL, MongoDB, and SQLite.

  • Host & Docker Aware: It automatically scans for host-installed engines and active Docker containers, reading admin credentials directly from container environments so you don’t have to type them.

  • Zero-Leak Security Model: Credentials and cloud tokens never touch argv (the command line arguments), meaning they can never be sniffed via ps. It uses option files, environment variables, or pipes data directly into the child process’s STDIN.

  • Smart Auto-Naming: Great for Virtualmin shared hosting setups, it automatically names backup files based on the database’s domain or path.

  • Cloud Integrations: Built-in rclone engine to ship backup sets to Amazon S3, Dropbox, or Google Drive, complete with safe verification checksums (SHA-256) and optional GnuPG AES-256 encryption at rest.

  • Flexible Retention & Cron: Keeps a strict number of sets or prunes based on age using safe, symlink-aware verification that only touches its own directories.

Requirements:

  • Webmin or Virtualmin

  • The respective client tools for your engine (mysqldump, pg_dump, etc.) on the host or inside the target container.

  • Perl JSON::PP (ships natively with Perl 5.14+)

  • Optional: rclone (for cloud storage), gpg (for encryption), and docker.

Installation: The repository is completely open-source (GPLv2). You can explore the source code and grab the pre-packaged module here: GitHub - MrZaKaRiA/Virtualmin-Db-Backup: Hardened Webmin/Virtualmin module to back up MySQL, MariaDB, PostgreSQL, MongoDB & SQLite (host or Docker) — compression, encryption, checksums, cloud upload (S3/Dropbox/Drive) and scheduling. · GitHub

  1. Download dbbackup.wbm.gz from the Releases tab.

  2. Inside your panel, head over to Webmin > Webmin Configuration > Webmin Modules.

  3. Choose “From uploaded file”, upload the archive, and click Install.

  4. Access it natively under Servers > Database Backup.

To get started quickly, you can just click Connections → Detected sources → Import to automatically pull in your local MySQL or Docker databases.

I’d love to hear your feedback, especially if you have complex multi-engine or containerized database environments you can test it against. If you have any feature requests or spot a bug, feel free to open an issue on the GitHub tracker!