GitHub - db-branch/db-branch: Instant MySQL database branches on ZFS clones, clustered across VMs with ProxySQL routing
db-branch is a self-hosted, Apache-2.0 tool that creates copy-on-write branches of MySQL and PostgreSQL databases in seconds using ZFS clones. It's aimed at giving AI agents, CI runs, and pull requests their own disposable database copy without touching production.
- Branches are ZFS clones, so creation copies nothing; on their 3-node test cluster, a PostgreSQL branch was ready in about 0.5 s and a MySQL branch in about 3 s.
- Branches can be reset, checkpointed and restored, and given a TTL so they delete themselves automatically.
- Upgrades can be tested per branch (e.g. MySQL 8.0 to 8.4) with a checkpoint saved first and automatic rollback on failure, leaving the base untouched.
db-branch creates copy-on-write database branches for MySQL and PostgreSQL on your own Linux servers, using ZFS clones. A branch is a clone of a base snapshot, so creation copies nothing: the project reports about 0.5 seconds for a PostgreSQL branch and about 3 seconds for MySQL on its three-node test cluster. Each branch runs its own database server on its own port, and you can reset it to its creation state, delete it, or let it expire with a `--ttl` flag. Checkpoints save and restore a branch's state instantly, and per-branch version upgrades let you test a move from MySQL 8.0 to 8.4 on one branch, with a checkpoint taken first and automatic rollback on failure, while the base and other branches stay untouched.
The use cases the author names are AI agent sandboxes (an MCP server lets an LLM create a branch, run something risky, and delete it), a fresh database per pull request in CI, and dry-run version upgrades. The project is still in Beta, so APIs and CLI details may change before 1.0. It requires Ubuntu 24.04 or 26.04 and a ZFS pool, and it is not a hosted service. The article includes a browser-only demo, a Multipass VM setup for Mac and Windows (with a note that the Apple Silicon download is about 800 MB because Oracle ships no minimal arm64 MySQL build), and an apt install path with a published signing key fingerprint.
Licensing is split. The core, covering branches, bases, clustering, CLI, REST API, web console, and MCP, is Apache-2.0. Routing (ProxySQL) and masking (Greenmask, anon) modules are free in the same apt repository. Auth/SSO, audit, history, diff, and FSx storage are paid, closed-source add-ons enabled by a license key, with the history module and paid modules running for 30 days without a key in the evaluation VM. A governed masking workflow is mentioned as a planned opt-in beta. For anyone deciding whether this fits, the main questions are the Beta status, the requirement for ZFS, and the fact that the free tier is the open core plus free modules.