NEWdbtwin v1 is being built in the open. Follow along on GitHub

Production MySQL, twinned for every pull request

Give every pull request, developer and agent run its own full copy of your database, made in seconds and thrown away when the work is done.

Star on GitHubGet started

$ curl -fsSL https://dbtwin.dev/install.sh | sudo sh

BRANCHES5 ACTIVE · 1 SLEEPING
main8.4 · SOURCE
github/pr-1842-invoices8.4 · ACTIVE
ci/migrate-orders-54728.4 · ACTIVE
dev/rafid-checkout8.4 · SLEEPING
upgrade/mysql-9-dry-run9.x · ACTIVE
agent/eval-run-7f3a8.4 · ACTIVE
agent/eval-run-9b218.4 · ACTIVE

CLONES FROM ANY MYSQL

Amazon RDSAurora MySQLAzure MySQLCloud SQLPlanetScale exportSelf-hosted

The problem

Modern teams need more than one shared staging database.

More developers, more pull requests, and now AI agents all change the schema at once. Shared staging turns every migration into a collision.

With shared staging

Everyone edits the same data

PR #1842 · add invoicesmigration conflict
PR #1851 · orders indextests failing
Agent run · refactor usersdata overwritten
QA · checkout flowschema changed mid-test

With dbtwin

Every change gets its own twin

PR #1842 · add invoicesbranch ready
PR #1851 · orders indextests passed
Agent run · refactor usersisolated, disposable
QA · checkout flowstable data

01

Change schemas safely

Run every migration on a private copy first. See exactly what breaks before production ever does.

02

Test on real-shaped data

Seed files and empty databases hide the bugs that only show up at full size. Your twin has all of it, with private data hidden.

03

Work in parallel

Every developer, pull request and agent gets its own database. Nobody waits for staging again.

Copy-on-write

Clone any MySQL in seconds, whatever its size.

dbtwin branches at the storage layer with ZFS. A new twin copies nothing up front. It shares every unchanged block with main and stores only what you change.

Shared blocks, private changes

main21.8 GB
pr-18428.5 MB own
port
41235
memory
2 GB cap
ready in
seconds

Plain, upstream MySQL

No fork, no custom engine. Each twin is the official MySQL image, so your ORM, drivers, migrations and tools work unchanged.

InnoDBLaravelRailsDjangoPrismaFlywaymysql CLIforeign keystriggersstored procedures

Four commands

# point dbtwin at production (read-only)
$ dbtwin connect --host db.prod --user reader
# bring in a fresh, masked copy
$ dbtwin refresh
# a full twin in seconds
$ dbtwin create pr-1842
branch pr-1842 is ready on 127.0.0.1:41235
$ dbtwin delete pr-1842

Scale to zero · on the roadmap

Idle twins sleep. The first query wakes them.

A small proxy holds the port while a twin is asleep and starts it on connect. Keep dozens of branches open without paying for dozens of running databases.

mysql CLITablePlusDBeaverEloquentGORMPrisma
dev/rafid-checkoutSLEEPINGACTIVE
mysql> SELECT id, status, total FROM orders
    -> ORDER BY id DESC LIMIT 3;
+------+----------+--------+
| id   | status   | total  |
+------+----------+--------+
| 9921 | paid     | 128.40 |
| 9920 | refunded |  42.00 |
| 9919 | paid     |  17.95 |
+------+----------+--------+
3 rows in set
# twin woke on connect, no config change

Use cases

Made when work starts. Gone when it ends.

Twins follow your workflow automatically, then clean up after themselves.

Pull requests

The GitHub Action creates a twin when a PR opens, runs your migrations, posts the result and schema diff as a comment, and deletes it on merge.

Learn more →

Coding agents

Hand each agent run a disposable twin through the HTTP API. Let it migrate, seed and break things, then throw the twin away.

Learn more →

Every developer

A personal twin per laptop. Reset it to fresh data any time with dbtwin reset, keeping its name and port.

Learn more →

Adoption

Adopt dbtwin without moving production.

Keep production where it is

dbtwin reads from your existing MySQL with a read-only user and builds twins beside it.

  • Copies with --single-transaction: no locks on production
  • Emails, names and phones are masked before any twin exists
  • Safe refresh: if anything fails, main rolls back automatically
  • Schedule it nightly so twins always start from recent data
production
RDS / Aurora / Azure / self-hosted
main
masked copy on your dbtwin server
pr-1842
pr-1851
agent-7f3a

In v1

Built to run unattended.

One binary and a systemd service. It restarts twins after a reboot, cleans up after failures and tells you exactly what it is doing.

All twins healthy
$ dbtwin status
service        active (running)
source         db.prod · read-only
main data      02 Dec 2026, 03:00
branches       6 of 20
pool           tank/dbtwin

Instant branches

Full copies via ZFS copy-on-write. create · list · reset · delete

Connect any MySQL

Saved, tested source connection. Password stored root-only.

Safe refresh

Streamed copy with lock, save point and automatic rollback.

Data masking

A rules file hides emails, names and phones before twins are made.

Isolated access

Own container, port, user and password per branch. Memory limits included.

Data date

list shows when each twin's data left production.

HTTP API

Create, list, reset and delete over REST, with token auth.

GitHub Action

Twin per PR, migrations run, results and schema diff on the PR.

Branch lifecycle

Auto-expire, deletion protection and a max-branches limit.

Self-healing

Auto-restart after reboots, cleanup on failure, clear errors with logs.

Upgrade testing

Try a new MySQL version on a twin before touching production.

Runs anywhere

One binary, a systemd service and an install script for any Linux server.

Example

What do 20 pull requests cost on a 50 GB database?

Full copies multiply your storage by every open PR. Twins only store what each PR actually changes.

Assumes 20 open branches, each changing about 500 MB of data. Disk only; main excluded.

Full copies1,000 GB
dbtwin twins10 GB

For platforms

Give your users a database per branch.

Provision in seconds

One API call returns host, port, user and password.

Branch at any size

Creation time does not grow with your data.

Hard limits built in

Memory caps, branch limits and auto-expiry per twin.

Deploy on your terms

Self-host, our cloud, or your own cloud account.

Coming next

Built in the open. Here's where it's going.

After v1, dbtwin grows from a branching tool into a full development platform for MySQL.

v1.x

Live sync with CDC

Stream the binlog to keep main minutes behind production, masked on the fly.

v1.x

Scale to zero

Idle twins sleep and use no memory. A small proxy wakes them on the first query.

v1.x

Migration insights

Warnings for risky ALTERs and real timing on full-size data, right on the PR.

v2

Zero-downtime deploys

Ship reviewed schema changes to production with gh-ost, with a quick revert.

v2

Branches for AI agents

Disposable twins per agent run, plus AI review of migrations and private-column detection.

v2

Kubernetes operator

A Helm chart and operator for teams that run everything on Kubernetes.

v2

Separate storage and compute

Storage servers hold the data; compute runs twins anywhere and scales on its own.

later

dbtwin Cloud and BYOC

A managed service, or run it in your own cloud account. SSO, roles and audit logs for teams.

Pricing

Choose how you run it.

Open source

Free

Self-host on your own Linux server. Apache 2.0.

  • All v1 features
  • CLI, API and GitHub Action
  • Community support on GitHub
Install now

dbtwin Cloud

[YOUR PRICE]

We run the servers. Connect your database and go.

  • Everything in open source
  • Scale to zero and live sync
  • Email support
Join the waitlist

BYOC

Custom

Managed dbtwin inside your own cloud account. Data never leaves.

  • SSO, roles and audit logs
  • Private networking
  • Priority support
Talk to us

Get started now. Branch in seconds.

Give your next pull request a twin of production. Open source, on your own server, in minutes.

curl -fsSL https://dbtwin.dev/install.sh | sudo sh
Join the Cloud waitlistGet started on GitHub