Parallel logical dump, hot physical via xtrabackup/mariabackup with LSN incremental chain, MySQL 8.0.17+ CLONE INSTANCE agent-less, transportable tablespaces, and native DR-replica provisioning.
Technical companion to the PodHeitor MySQL plugin page.
1. Why not the Bacula Enterprise MySQL plugin?
The Enterprise plugin is proprietary Perl glue around mysqldump / xtrabackup. It works, but:
- Requires Perl runtime on every FD host.
- Sequential per-database jobs (no in-job parallelism).
- Documented as incompatible with Bacula’s own AES volume encryption when using
xtrabackup --prepare. - No DR-replica provisioning, no TDE automation, no CDP sidecar.
- Closed source — you cannot audit or patch what’s protecting your DB.
- Priced for Fortune-500 budgets.
PodHeitor delivers the same feature set — and more — as a single Rust musl static-pie binary of ~540 KB, no Perl, no Python runtime.
2. Architectural model
PodHeitor pattern: FD cdylib podheitor-mysql-fd.so (pure Rust, no Bacula AGPLv3 source linked) + standalone backend, PTCOMM communication on stdin/stdout.
Since v2.0.0, the cdylib is built from ../PodHeitor Rust cdylib/crates/plugin-mysql/. No Bacula AGPLv3 source, headers, or object files are statically linked. The legacy C++ shim has been removed.
3. Backup modes
| Mode | Function | Engine used |
|---|---|---|
dump |
Per-DB logical dump with parallelism (parallel_dbs) |
mysqldump / mariadb-dump |
xtrabackup |
Physical hot backup with LSN incremental chain | xtrabackup (Percona) |
mariabackup |
MariaDB physical hot backup | mariabackup |
clone |
MySQL 8.0.17+ CLONE INSTANCE agent-less |
Native SQL |
replicate |
DR provisioning — restore + automatic replica setup | SQL + CHANGE REPLICATION SOURCE |
4. Topology awareness and safety gates
The plugin auto-detects MySQL topology and applies configurable safety gates:
| Detected topology | Detection | Behavior |
|---|---|---|
| Standalone | — | Direct backup |
| Async-Replica | SHOW REPLICA STATUS |
Backup the replica (offload primary) |
| Group Replication | performance_schema.replication_group_members |
Backup a secondary member; verify lag |
| Galera | wsrep_local_state |
Auto-desync donor with RAII guard |
4.1 require_replica=true — safety gate
Stock Bacula + xtrabackup typically backs up the primary (because it’s the “default” node). In a serious MySQL fleet that’s exactly what you don’t want — the primary is already busy serving writes. Setting require_replica=true makes the plugin refuse backup if the connected node is primary. Combine with max_replica_lag=60 to avoid backups of stale replicas.
4.2 Galera donor RAII guard
In Galera, a node taken for backup must be desynced from the cluster (SET GLOBAL wsrep_desync=ON) to keep flow control from affecting the whole cluster. The plugin does this with an RAII guard: the flag is set before backup and guaranteed to be removed even on panic/crash of the backend, via Drop trait.
5. DR-replica provisioning (replicate mode)
Production-validated (JobId 3592). On restore to the DR host the plugin automatically runs:
STOP REPLICA;
RESET REPLICA ALL;
CHANGE REPLICATION SOURCE TO
SOURCE_HOST='192.168.15.131',
SOURCE_PORT=3306,
SOURCE_USER='repl_user',
SOURCE_PASSWORD='<from repl_password_file>',
SOURCE_AUTO_POSITION=1;
START REPLICA;
Then it verifies both threads (Replica_IO_Running and Replica_SQL_Running) are healthy before returning success. Without this, “DR” means restoring the dump and operationally remembering to configure replication — usually forgotten until the next incident.
6. Additional features
| Feature | Status |
|---|---|
Transportable tablespaces — single-table restore via IMPORT TABLESPACE |
Production |
| TDE keyring export + re-install on restore | Production |
CDP binlog streamer sidecar — mysqlbinlog --stop-never --raw + systemd unit |
Production |
| Prometheus textfile-collector metrics | Production |
Post-restore verify (basic/checksum/deep) |
Production |
| PTCOMM streaming — zero staging area, native Bacula-encryption compatible | Production |
docs/ENTERPRISE_PARITY.md maps 48 out of 48 Bacula Enterprise MySQL Plugin 18.2.3 features that are matched or exceeded.
7. Validated support matrix
| Engine | Versions | Mode coverage |
|---|---|---|
| MySQL Community / Enterprise | 5.7 EOL · 8.0 ≥ 8.0.17 · 8.4 LTS | dump, xtrabackup, clone, replicate |
| Percona Server | 8.0.x | dump, xtrabackup, clone, replicate (+ TDE keyring) |
| MariaDB | 10.5 · 10.6 LTS · 10.11 LTS · 11.4 LTS | dump, mariabackup, replicate |
OS: Oracle Linux 9 / RHEL 9 / Rocky 9 / AlmaLinux 9, EL8 (rebuild), Debian 12, Ubuntu 22.04/24.04. Bacula: Community 15.0.3.
8. Documented anti-patterns
- Don’t combine Bacula’s AES volume encryption with
xtrabackup --preparewithout end-to-end restore testing. Enterprise documentation acknowledges the incompatibility; PodHeitor synthesizes prepare during restore to avoid this problematic mode. - Don’t run
require_replica=falsein production without understanding that this allows backing up the primary — it may be intentional, but it’s the most common source of “backup got slow and erased my p99 latency.” - Don’t trust high
parallel_dbswithout tuning host I/O. 4 parallel dumps of large DBs saturate disk before CPU. Start at 4, monitoriostat.
9. License posture
Plugin under LicenseRef-PodHeitor-Proprietary. Bacula AGPLv3 source not statically linked since v2.0.0. The legacy C++ shim src/podheitor-mysql-fd.{c,h} has been removed. Bindings via independent bacula-fd-abi crate.
Ready to evaluate?
30-day commercial trial for production MySQL/MariaDB/Percona fleets. Guaranteed at minimum 50% discount vs Bacula Enterprise, Veeam or Commvault, with more capabilities included.
Heitor Faria — Founder, PodHeitor International
✉ [email protected]
☎ +1 (789) 726-1749 · +55 (61) 98268-4220 (WhatsApp)
🔗 PodHeitor MySQL plugin page
Disponível em:
Português (Portuguese (Brazil))
English
Español (Spanish)