hn.today

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

github.com45 points16 comments
Screenshot of Show HN: db-branch – database branches in seconds for AI agents and CI, via ZFS

db-branch is a self-hosted tool for creating disposable MySQL and PostgreSQL database branches on Linux servers with ZFS. It uses copy-on-write clones, so branches are ready without copying the database: reported creation times on a three-node test cluster are about half a second for PostgreSQL and three seconds for MySQL, with no data copied at creation. The project targets AI-agent sandboxes, pull-request testing, migration checks, and database-version upgrades. Each branch can be reset, given an automatic expiry time, checkpointed and restored, or upgraded independently; failed upgrades roll back automatically after a checkpoint is saved.

A base is a ZFS dataset containing a loaded database, and each branch runs its own database server. Multiple VMs can form a Raft cluster, with optional ProxySQL routing, while a shared API supports the command-line tool, web console, REST interface, and an MCP server for AI agents. The Apache-2.0 core includes branching, clustering, and these interfaces; free add-on modules provide routing and data masking, while paid, closed-source modules add features such as SSO, auditing, history, and data diffs. There is no hosted service. The software is in beta, requires Ubuntu and ZFS, and its APIs and command-line details may change before version 1.0; a file-backed ZFS pool is offered for evaluation but is not intended for production data.

Read on github.com16 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Aristotle Expands into Rust

Aristotle has expanded its formal verification platform to Rust, allowing developers to prove code meets specifications and contains no undefined behavior, including in unsafe blocks. It can also verify that Rust rewrites behave like their original C code, targeting critical software such as smart contracts and infrastructure. (harmonic.fun)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.