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.
$ curl -fsSL https://dbtwin.dev/install.sh | sudo sh
CLONES FROM ANY MYSQL
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
With dbtwin
Every change gets its own twin
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
41235
2 GB cap
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.
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.
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
RDS / Aurora / Azure / self-hosted
masked copy on your dbtwin server
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.
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.
For platforms
Give your users a database per branch.
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
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
BYOC
Custom
Managed dbtwin inside your own cloud account. Data never leaves.
- SSO, roles and audit logs
- Private networking
- Priority support
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