Point-in-time recovery for MySQL — no locks, no schema changes, no waiting for a restore.
SELECT * FROM orders WHERE id = 123 AS OF '2026-05-20 14:00:00'
— against production MySQL. That's the experience dbtrail makes possible.
<img src="docs/img/console-overview.png" alt="dbtrail console: what changed recently and where — every row change indexed, deletes surfaced first" width="850"> </div>What you get
dbtrail tails the MySQL binary log and keeps every row change with full before/after images in a searchable index:
- See every change — what changed and when, for every row, with before → after diffs
- Undo precisely — generate exact reversal SQL for just the damaged rows
- Undo cascade deletes — reconstruct child rows an
ON DELETE CASCADEwiped out (and restore FKs anON DELETE SET NULLcleared) that InnoDB removes below the binlog and most tools can't see — see Query & Recovery - Time-travel — query any row (or table) as it was at any moment (requires ProxySQL — see Time-Travel SQL)
- Web console — browse, recover, and add servers to monitor, all in the UI
- MCP server — Claude or any MCP client can search history and draft recoveries
Works with MySQL, Percona Server for MySQL, Amazon RDS for MySQL,
Amazon Aurora MySQL, and Google Cloud SQL for MySQL — dbtrail connects
over the replication protocol, so it never needs the binlog files on disk
(that's what makes managed cloud databases work). Requires MySQL 8.0+ with
binlog_format=ROW and binlog_row_image=FULL; bintrail doctor checks both
and prints the exact fix.
Install
curl -fsSL https://raw.githubusercontent.com/dbtrail/dbtrail/main/install.sh | sh
This downloads the Compose stack, brings it up, waits for the console, and prints what to do next. Then:
- Open http://127.0.0.1:8090 — on first run, create a username and password (that's your login from now on).
- Click + Add server and paste the MySQL you want to watch — host, user, password. dbtrail runs preflight checks, provisions an index, and starts streaming within the minute.
Just curious? One container, zero setup, time-travel SQL in 30 seconds:
docker run --rm -p 6033:6033 ghcr.io/dbtrail/bintrail-demo
See the demo image.
Documentation
License
Apache-2.0 — free for any use, including commercial and production. Contributions welcome: see CONTRIBUTING.md (CLA required, prompted automatically on your first PR).