by db-branch
Instant MySQL database branches on ZFS clones, clustered across VMs with ProxySQL routing
# Add to your Claude Code skills
git clone https://github.com/db-branch/db-branchdb-branch is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by db-branch. Instant MySQL database branches on ZFS clones, clustered across VMs with ProxySQL routing. It has 121 GitHub stars.
db-branch's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/db-branch/db-branch" and add it to your Claude Code skills directory (see the Installation section above).
db-branch is primarily written in Go. It is open-source under db-branch on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh db-branch against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Instant database branches for MySQL and PostgreSQL, on your own servers. Create a copy-on-write branch of a large database in seconds, break it, reset it, throw it away.
Try it in your browser in 10 seconds: https://demo.db-branch.com/from/readme (nothing real is created).

Test a migration, let an AI agent loose, or give every pull request its own copy of the database. db-branch creates a branch with nothing copied. Built on ZFS clones, self-hosted, Apache-2.0.
Status: 1.0 (GA). Independent open-source project, built from scratch and following Semantic Versioning from 1.0.
In your browser, 0 minutes. A live console demo runs entirely in the page (nothing real is created): https://demo.db-branch.com/from/readme
On a Mac or Windows machine, about 2 minutes. db-branch needs Linux and ZFS, so run it in an Ubuntu VM with Multipass. One command makes the VM, installs db-branch, initialises it on a file-backed ZFS pool and loads a small sample base, shop (MySQL 8.0), via db-branch base create-sample (first-time admin logins in the console also launch an interactive guide tour):
multipass launch 24.04 --name db-branch-eval --memory 4G --disk 30G --timeout 900 \
--cloud-init https://raw.githubusercontent.com/db-branch/db-branch/main/scripts/eval-cloud-init.yaml
multipass exec db-branch-eval -- cloud-init status --wait # wait for the setup (about two minutes)
multipass exec db-branch-eval -- cat /etc/motd # console URL and sign-in (admin / admin), or what failed
multipass shell db-branch-eval # then: sudo db-branch branch create try --base shop --ttl 1h --record
On Windows (PowerShell or cmd), put the multipass launch command on one line and drop the \:
multipass launch 24.04 --name db-branch-eval --memory 4G --disk 30G --timeout 900 --cloud-init https://raw.githubusercontent.com/db-branch/db-branch/main/scripts/eval-cloud-init.yaml
--record records a branch so it can be restored to any point.admin; the console asks for a new one at the first sign-in.--timeout 900 keeps launch from giving up on a slow connection./etc/motd says so, and sudo tail -n 30 /var/log/cloud-init-output.log in the VM shows why.multipass delete --purge db-branch-eval.On your own Ubuntu server. See Install.
--ttl when it is no longer needed.branch upgrade --check-only to see what it would run into, before touching the base.branch reset returns a branch to its creation state; --ttl deletes it automatically.branch checkpoint saves a running branch's state instantly; branch restore puts it back (restoring replaces the current state, and every checkpoint you already have stays restorable). branch fork clones a running or paused branch (or one of its checkpoints) into a new independent branch. Within a single branch, branch merge logically merges changes from an older history line (left behind by branch restore) into the live line, aborting without modifying live data if any conflict is detected.branch upgrade moves one branch to a newer MySQL or PostgreSQL version while the base and the other branches stay put. A checkpoint is saved first, and a failed upgrade rolls back by itself.

Requirements: Ubuntu 24.04 LTS or 26.04 LTS, and a ZFS pool (the zfsutils-linux package is installed as a dependency).
curl -fsSL https://apt.db-branch.com/db-branch.gpg | sudo tee /usr/share/keyrings/db-branch.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/db-branch.gpg] https://apt.db-branch.com stable main" | sudo tee /etc/apt/sources.list.d/db-branch.list
sudo apt update && sudo apt install db-branch
sudo db-branch init --pool <zpool>
The repository signing key fingerprint is 3F404C4E5D49FA653F8385692C6E89E341D4D7A5. db-branch init prints the initial admin password once.
db-branch base create-sample # or load the built-in shop dataset (MySQL/Postgres)
db-branch runtime install [email protected] # a database engine version
db-branch base create prod --runtime [email protected] --dump prod.sql.gz # a base: your data, loaded once
db-branch branch create feature-x --base prod --ttl 72h # a branch: instant, copy-on-write
db-branch branch dsn feature-x # connection URL (includes the password)
db-branch branch checkpoint feature-x --name before-migration # save the state (instant)
db-branch branch restore feature-x before-migration # go back to the saved state
db-branch branch reset feature-x # discard every change
db-branch branch delete feature-x # remove it
MySQL works the same way, for example [email protected]. List installable versions with db-branch runtime available. To try a version upgrade on one MySQL branch:
db-branch branch upgrade feature-x --runtime [email protected] --check-only # what would the upgrade run into?
db-branch branch upgrade feature-x --runtime [email protected] # move this branch only; a checkpoint is saved first
A base is a ZFS dataset holding a loaded database. A branch is a ZFS clone of a base snapshot, so creating one copies nothing, and each branch runs its own database server on its own port. Optionally, ProxySQL routes client connections to the right branch by user name (or by a /*db_branch='name'*/ query comment). Several nodes form a Raft cluster that shares bases, branches, settings and users.
branch merge can logically 3-way merge row and schema changes between history lines created by branch restore; see docs/branch-merge.md). db-branch is built for disposable sandboxes (AI agents, CI runs, migration tests) that you reset or throw away.SELECT queries. Load masked data when creating the base (using a masked dump) rather than relying on post-branch masking.recordsize tuning. ZFS's default recordsize (128K) does not match database page sizes, causing double copy-on-write / fsync write amplification and hurting random I/O. Matchi