dbtrail (GitHub Repo)
dbtrail provides point-in-time recovery for MySQL by streaming binary logs into a searchable index, enabling time-travel queries without restore operations.
Decoder
- Binary Log (binlog): A set of log files that contain information about data modifications made to a MySQL server instance.
- Point-in-Time Recovery (PITR): The ability to restore a database to a specific millisecond in the past.
- MCP (Model Context Protocol): An open standard for connecting AI assistants to data and tools, allowing LLMs to interact directly with internal systems.
Original article
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.
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. - Time-travel — query any row (or table) as it was at any moment.
- 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. 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
License
Apache-2.0 — free for any use, including commercial and production. Contributions welcome.
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi