# db-branch 用 ZFS 克隆在数秒内为 MySQL、PostgreSQL 创建写时复制数据库分支

- 原标题：Show HN: db-branch – database branches in seconds for AI agents and CI, via ZFS
- 类型：项目 · 能力
- 来源：GitHub
- 发布时间：2026-11-13
- 首次精选：2026-11-17 12:18
- 分级：值得看
- 是否付费：免费（公开仓库）
- 预估学习时长：约 10 分钟（模型按 README 估算）
- 学习层级：进阶
- 主题：[agent-permissions-sandboxing](<https://oplearnx.com/md/topics/agent-permissions-sandboxing.md>)（第 11 位）、[agent-architecture-harness](<https://oplearnx.com/md/topics/agent-architecture-harness.md>)（第 14 位）
- 原文链接：[https://github.com/db-branch/db-branch](<https://github.com/db-branch/db-branch>)
- 本站页面：[https://oplearnx.com/resources/pk\_b6dd2987591a](<https://oplearnx.com/resources/pk_b6dd2987591a>)

## 摘要

db-branch 是一个自托管、Apache-2.0 的开源项目，基于 ZFS 克隆在数秒内为大型数据库创建写时复制分支，无需拷贝数据。可用于测试迁移、让 AI Agent 自由操作，或给每个 pull request 一份独立数据库副本，并可随时重置或删除。目前为 Beta 阶段，提供浏览器内演示和基于 Multipass 的本地试用方式。

## 热度

- 档位：有热度
- 7 天新增 star：+30
- 30 天新增 star：暂无数据
- Hacker News：[43 分 · 15 条评论](<https://news.ycombinator.com/item?id=50506940>)
- 社区讨论：1 帖

## 项目信息

- 语言：Go
- 许可：Apache-2.0
- 最近提交：2026-11-28
- Star：118
- Fork：4

## 上手方式

```sh
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>
```

摘自 [README](<https://github.com/db-branch/db-branch/blob/main/README.md>)

## 推荐信源

- [Hacker News](<https://news.ycombinator.com/item?id=50506940>)（2026-11-15）

## 原文涉及

- [db-branch demo: database branches in your browser](<https://demo.db-branch.com/>)

---
来源：LearnMap · 学径（https://oplearnx.com）
