# db-branch - Instant MySQL and PostgreSQL branches via ZFS clones

Original title: Show HN: db-branch – database branches in seconds for AI agents and CI, via ZFS

> Hacker News story 50506940 · language: en · submitted 2026-11-15
> Web version: https://zeli.app/story/50506940
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 45 · by [nu_nu11](<https://news.ycombinator.com/user?id=nu_nu11>) · 💬 16
[original](<https://github.com/db-branch/db-branch>) · [HN discussion](<https://news.ycombinator.com/item?id=50506940>)

## Summary

db-branch lets you spin up copy-on-write database branches in seconds, with zero data copied at creation. Built on ZFS clones, it's perfect for AI agent sandboxes, per-pull-request databases in CI, and safe migration testing. Each branch runs its own database server, and you can reset, checkpoint, or expire it with a single command. It supports MySQL and PostgreSQL across multiple versions, offers a CLI, REST API, web console, and MCP server, and can run on a single node or a Raft cluster with ProxySQL routing. Self-hosted and Apache-2.0 licensed.

## Key quote

> db-branch creates a copy-on-write branch of a large database in seconds, with nothing copied. Break it, reset it, throw it away.

## HN discussion (16 comments)

### [pjm331](<https://news.ycombinator.com/item?id=50509628>)

> So nice to have a way to get cheap db clones, I just set up this at work recently to do the same thing https://postgres.ai/docs/database-lab

### [rzzzt](<https://news.ycombinator.com/item?id=50509769>)

> Is it possible to merge changes from a clone/branch back to the "official copy"?

### [t0mas88](<https://news.ycombinator.com/item?id=50508916>)

> Postgres 18 has file_copy_method = clone for this, is that used underneath or did you implement your own own?

---

## Cite

- Page: https://zeli.app/story/50506940
- Date: 2026-11-15
- Source: github.com (https://github.com/db-branch/db-branch)
- Hacker News: https://news.ycombinator.com/item?id=50506940

## Other languages

- zh: https://zeli.app/zh/story/50506940 · markdown: https://zeli.app/zh/story/50506940.md
- ja: https://zeli.app/ja/story/50506940 · markdown: https://zeli.app/ja/story/50506940.md
- ko: https://zeli.app/ko/story/50506940 · markdown: https://zeli.app/ko/story/50506940.md
- de: https://zeli.app/de/story/50506940 · markdown: https://zeli.app/de/story/50506940.md
- es: https://zeli.app/es/story/50506940 · markdown: https://zeli.app/es/story/50506940.md
- ru: https://zeli.app/ru/story/50506940 · markdown: https://zeli.app/ru/story/50506940.md
