Instant database branches for MySQL and PostgreSQL, on your own servers
open coreApache-2.0self-hostablefreeMCP
db-branch makes copy-on-write branches of a MySQL or PostgreSQL database from ZFS clones: a base is a ZFS dataset holding a loaded database, and each branch is a clone of a base snapshot running its own database server, so nothing is copied when a branch is created. Branches can be reset, checkpointed and restored, expire after a TTL, and can be upgraded to a newer engine version one at a time. One API backs the CLI, a REST API, a web console and an MCP server for AI agents, and several nodes can form a Raft cluster with optional ProxySQL routing. It needs Ubuntu 24.04 or 26.04 and a ZFS pool, and is in beta.
Problems it solves
- give every pull request its own copy of our large MySQL database in seconds
- let an AI agent run risky queries and migrations without touching the real database
- copying a 500 GB database for each test run takes hours and the disk space
- test a MySQL 8.0 to 8.4 upgrade on a copy of production before doing it for real
- throwaway database copies on our own servers, not a cloud service
- reset a test database to how it was before the migration in one command
- save a checkpoint of a dev database and go back to it later
- copy-on-write clones of a Postgres database on a ZFS server
- give each git worktree its own writable copy of the dev database
- temporary database copies that delete themselves after a few days
Features
- copy-on-write branches from ZFS clones
- reset, checkpoint and restore
- branch TTLs
- per-branch engine upgrades
- MySQL and PostgreSQL runtimes side by side
- CLI, REST API, web console and MCP server
- Raft cluster with optional ProxySQL routing
- free masking modules (greenmask, anon)
Ways to run it
Community
Only in this edition
- bases, snapshots and branches
- checkpoints and branch upgrades
- cluster, console, CLI, API and MCP
- scheduled refresh and free masking tools
- any number of nodes
Not included
- recording a branch to restore any transaction (MySQL)1
- user accounts and roles, SSO and audit log (planned paid modules)1
You arrange
- an Ubuntu 24.04 or 26.04 server
- a ZFS pool
- a dump or copy of the database to load as a base
Lite
Price not published1
Only in this edition
- record a branch and go back to any transaction (MySQL)
- history of what changed, with the checkpoints
Not included
- more than 3 nodes1
You arrange
- the same server and ZFS pool as Community
- a licence key
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Has an MCP server | plan not known |
| Takes plugins | plan not known |
Alternatives
The same job
These do what db-branch does.
- Neon Serverless Postgres with branching, autoscaling and scale to zero
- DBLab Engine Blazing-fast PostgreSQL cloning and branching for dev/test environments and CI
- Xata Open source, cloud native, Postgres platform with copy-on-write branching and scale-to-zero
- pgoverlay Instant, writable copy-on-write branches of your real Postgres, self-hosted on plain Docker or Kubernetes. No ZFS required.
- RiftDB Instant, copy-on-write database branches for Postgres. Self-hosted. Every PR gets its own database.
- dbfork Fast local PostgreSQL database branching for migrations, schema testing, and isolated development workflows