Dbtrail

com.dbtrail由 dbtrail.com 发布官方发布者v0.1.0更新于 Oct 24, 2026

MySQL change tracking with instant row-level recovery and forensic attribution for compliance.

已验证Streamable HTTP可网页运行数据库安全与监控数据与分析

概览

AI 生成的概览

DBTrail 提供只读的 MCP 接口,连接 MySQL 变更追踪副本,让助手用自然语言查询历史行版本与变更记录。

可以做什么
  • 用自然语言询问从 MySQL binlog 捕获的变更
  • 浏览近期变更,查看某行或某表在过去某一时刻的状态
  • 通过 DuckDB 视图查询表的 Parquet 分析副本
  • 查看为受损行生成的撤销 SQL,由你自行审阅后执行
适用场景
适合已在 MySQL、RDS 或 Aurora 旁部署 DBTrail 的团队,希望让助手协助排查改了什么、何时改的、某行之前是什么样,或在不影响生产库的情况下探索分析副本。
运行要求
远程 MCP 端点;DBTrail 本身需已部署在你自己的基础设施上(Docker Compose,查询端需 DuckDB)。源 MySQL 需设置 binlog_format=ROW 与 binlog_row_image=FULL。README 未说明 MCP 的认证方式。
安装前请注意
MCP 工具被描述为只读,但 DBTrail 也会生成用于恢复的撤销 SQL;该 SQL 供你审阅后自行执行,运行前务必核对。历史从安装当天开始,不能当作备份,副本默认落后源库数分钟。官方构建默认发送仅含元数据的使用统计,可关闭。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Dbtrail,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/com.dbtrail%2Fdbtrail/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "dbtrail": {
      "type": "http",
      "url": "https://api.dbtrail.com/mcp"
    }
  }
}

README

[DBTrail: the open-source analytical replica for MySQL. Reads your binlog, writes Parquet to your bucket, query it with DuckDB.]

DBTrail keeps your MySQL tables as Parquet files you own, minutes behind the source, with every version of every row. Query them with DuckDB. Production never sees the query.

[Release] [License] [CI]

$ duckdb -init views.sqlD SELECT c.tier, count(*) AS orders, round(sum(o.total), 2) AS revenue  FROM demo.orders o  JOIN demo.customers c ON c.id = o.customer_id  GROUP BY c.tier ORDER BY revenue DESC;┌──────────┬────────┬───────────────┐│   tier   │ orders │    revenue    ││ varchar  │ int64  │ decimal(38,2) │├──────────┼────────┼───────────────┤│ platinum │ 539848 │   59426197.40 ││ gold     │ 539752 │   59353658.54 ││ silver   │ 539056 │   59295443.48 ││ bronze   │ 538385 │   59242795.95 │└──────────┴────────┴───────────────┘

That query read Parquet files. The MySQL primary never saw it.

Minutes behind the source. Not high availability, not a backup. Limits


Why

Reports, dashboards and ad-hoc analysis compete with your application when they run on the primary: a full scan pushes the working set out of the buffer pool, a long read holds back purge, and a GROUP BY over millions of rows spills temp tables to disk. A reporting replica is one more MySQL to pay for and patch, and it still answers at row-store speed.

DBTrail gives those queries a copy of their own, in a columnar format, outside mysqld.

How it works

  1. The first copy reads your tables once (with mydumper).
  2. After that, only the binlog. DBTrail connects over the replication protocol, the way a replica does. No plugin, no agent on the database host, no triggers. That is why Amazon RDS and Aurora work.
  3. On your schedule, the copy is updated. DBTrail folds the recorded changes into a new Parquet snapshot, from every 5 minutes to once a day. The source is not read again, unless a table changes shape (see Limits).
  4. You query it with DuckDB. A generated views.sql gives you one view per table, named like the source table (shop.orders), that follows the newest snapshot.

One Docker Compose stack, and a folder or an S3 bucket. No pipeline to build, no warehouse to run, no Kafka. See Analytics with DuckDB.

The numbers

Source: RDS MySQL 8.4, TPC-C dataset, 73 million rows, about 10 GB, under a sysbench-tpcc load of 180 transactions per second. Measured 18 to 20 September 2026 with DBTrail 0.84 refreshing every 5 minutes. Six report queries, total time:

Where the queries ranTotal time
MySQL22 min 28 s
ClickHouse fed by Airbyte CDC12.6 s
DBTrail + DuckDB4.6 s
MyDuck Server2.7 s

One of the six, a two-table join grouped by district and month, took 3 min 52 s on MySQL and 0.9 s on the copy. MyDuck was faster on this set: it keeps data in DuckDB's own format, which only DuckDB reads.

Freshness, measured separately under about 340 transactions per second with a 5-minute schedule: commit to visible in DuckDB took 2.7 to 13.2 minutes, median 5.9.

Method, cost comparison and ClickBench results: Introducing the MySQL Analytical Replica.

What you get

An analytical copy

  • Heavy queries off your MySQL. They run in DuckDB, in its own process, on the copy. Only the binlog leaves mysqld.
  • DuckDB, ready to open. One views.sql, one view per table. Your DuckDB runs it on your machine: a laptop, a notebook, a BI box.
  • Open files you own. Plain Parquet on disk or in S3, with a Hive-partitioned change history. Nothing proprietary.
  • Other engines too. Export a snapshot to Iceberg for Spark, Trino or Athena with bintrail export iceberg. See Iceberg export.

Open the copy through views.sql. An engine that reads the Parquet files directly sees each table as of its last full write and can miss the change files stored beside it. The views apply them for you.

Time travel and recovery, from the same stream

DBTrail keeps every change on your MySQL server, before and after, and writes the SQL that undoes the ones you didn't want. It reads them from the same binlog as the copy, from the day you install it:

  • Every version of every row. See any row or table as it was at a past moment, from the web interface or the reconstruct CLI. An optional MySQL port (beta) answers the same questions with AS OF SQL from any mysql client. See Time-Travel SQL.
  • Undo precisely. Generate the SQL that reverses just the damaged rows. recover-cascade also rebuilds the child rows an ON DELETE CASCADE removed below the binary log. DBTrail writes the SQL. You review it and you run it. See Query & Recovery.
  • Prove it holds. bintrail verify checks, from two snapshots and the index and without touching the source, that a recovery would reproduce it. bintrail status flags any gap the capture could not fill. See Verify.
  • Web interface and MCP. Add servers, schedule snapshots and browse changes in the browser. Connect Claude Desktop or any MCP client to ask in plain English. Every tool is read-only. See the 5-minute guide.

Try time travel in 30 seconds, with nothing of yours connected:

sh
docker run --rm -p 6033:6033 ghcr.io/dbtrail/bintrail-demo

See the demo image.

Limits

A copy you can trust is one whose edges you know.

  • Not high availability. Your application never points at the copy. Nothing fails over to it.
  • Not your backup. History starts the day you install it. Keep your physical backups.
  • Minutes behind, not seconds, by default. The copy refreshes on the schedule you set, and the SQL port answers from it. Its fresh mode, chosen per server in the web interface, also reads what capture has indexed since, usually seconds behind, for some memory and speed.
  • Needs a ROW binlog with full row images. binlog_format=ROW and binlog_row_image=FULL. bintrail doctor checks both and prints the fix (on RDS and Aurora, set them in the parameter group).
  • Some changes mean a full read. Adding, dropping, renaming or retyping a column, or a TRUNCATE, DROP or RENAME of a table, pauses the scheduled update until DBTrail reads the database again, at most once a day. That read takes a short lock: a global read lock while it starts, or, on RDS and Aurora, a lock on the tables it reads. A new table joins with a read of its own. Index and other everyday changes do not trigger one.
  • History needs a bucket. Without S3, row history keeps 48 hours by default (--rotate-retain changes it). The copy itself stays: the newest 3 snapshots per table on local disk.
  • Cascaded deletes before MySQL 9.6, and on MariaDB. Rows deleted by a foreign key never reach the binlog. recover-cascade rebuilds most of them, and the copy keeps them until DBTrail next reads the database in full.
  • Not a MySQL server. Reports run in DuckDB, not from your MySQL client. The optional MySQL port (beta, no TLS) only answers what a row or table looked like at a past moment, or what changed between two.
  • Yours to operate. DBTrail and its small index MySQL run on your machines. Disk and backups are yours.

Full list: Limitations.

What it works with

SourceAnalytical copyRow history and undo
MySQL 8.0, 8.4YesYes
Percona Server for MySQL 8.0, 8.4YesYes
Amazon RDS for MySQLYes (verified)Yes (verified)
Amazon Aurora MySQLYes (verified)Yes (verified)
Google Cloud SQL for MySQLShould work, please report issuesShould work
MariaDB 10.11+, including Amazon RDS for MariaDBYesYes. See MariaDB source
PostgreSQL 14+One-time copy only, no scheduled update yetBeta. See PostgreSQL source

DBTrail never needs the binlog files on disk, which is why managed cloud databases work.

Install

You need Docker with Compose, and DuckDB on the machine where you query.

sh
curl -fsSL https://raw.githubusercontent.com/dbtrail/dbtrail/main/install.sh | sh

This downloads the Docker Compose stack, starts it, waits until DBTrail answers, and prints the next steps.

  1. Sign in. Open http://127.0.0.1:8090, create a username and password, and press Create & sign in.
  2. Connect. Click + Add server, enter the host and port of your MySQL and press Find it. The form shows the SQL that creates DBTrail's user. Run it on your MySQL, then press I ran it. DBTrail checks the rest and starts on its own.
  3. First change. Change a row on your MySQL. It shows under Recent changes on the Overview within a minute, with an Undo that writes the SQL to reverse it.
  4. First copy. On Snapshots, press Read database now. Normally this is the only time DBTrail reads your tables directly.
  5. Set a schedule. On the Settings tab of Snapshots, under Update the copy, pick how often (every 5 minutes, for example) and press Turn on. Each run after the first folds the recorded changes instead of reading the source.
  6. Query it. On Snapshots, press Download, then Download the data. Unpack the .tar.gz and run duckdb -init views.sql inside the snapshot folder. To read the copy that keeps updating, see Query in DuckDB.

Prefer the command line? See the command-line quickstart.

Who builds it

DBTrail is built by Daniel Guzman-Burgos, former MySQL Technical Lead at Percona.

Documentation

Privacy

bintrail is DBTrail's command-line tool. It runs entirely in your infrastructure. Your database data never leaves it: not your rows, schemas, table names, queries, hostnames, DSNs, or file paths.

Official release builds do report metadata-only usage statistics: which command ran, whether it succeeded, a coarse error class, and your version and platform. It is on by default and turns off in one line:

sh
bintrail telemetry off      # or: DO_NOT_TRACK=1, BINTRAIL_TELEMETRY=offbintrail telemetry show     # prints what would be sent; sends nothing

No identifier of any kind is stored or transmitted, so nothing ties those statistics to you or your machine. A binary you build yourself has no reporting address compiled in and cannot send anything. TELEMETRY.md documents every field, every control, and the CI tests that enforce both.

The privacy policy covers the Claude Desktop extension (.mcpb), which reports nothing at all, and how data moves when an AI client queries your deployment.

License

Apache-2.0: free for any use, including commercial and production. Contributions are welcome; see CONTRIBUTING.md (a CLA is required, prompted automatically on your first PR).

Want the index server operated for you (sized, backed up, upgraded, kept alive on-call) instead of running it yourself? That is the managed service at dbtrail.com. SUPPORT.md draws the ship-vs-operate line.

来源:README.md,提交 e8dc656

工具

0
SourceWeft 尚未读取此服务器的工具。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式必需10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分