convez.ai
MCP ServerDevOps & InfraestruturaAvançado
dbtrail

DBTrail — Recuperação Point-in-Time para MySQL

dbtrail/dbtrail

Time-travel e recuperação de dados MySQL sem locks ou downtime

Ver no GitHub
BomPluginScore · de 0 a 100

MCP server que monitora o binary log do MySQL e mantém um índice pesquisável de todas as mudanças em linhas, permitindo viagem no tempo dos dados e geração automática de reversões SQL. Integra-se ao Claude para análise de histórico de alterações e recuperação de incidentes de dados sem necessidade de restore.

Instalação

$npx convez-ai dbtrail/dbtrail

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
72
Forks
9
Acompanhando
0
Saúde
75%
Último commit
há 1 dia
Versão
v0.135.1
Issues abertas
14
Contribuidores
2

Casos de uso

  • Recuperação rápida de dados alterados ou deletados acidentalmente
  • Auditoria e forensics de mudanças em banco de dados
  • Geração automática de SQL de reversão para incidentes
  • Consulta histórica de estado de dados em momento específico

Veredito

Ferramenta production-grade e bem pensada para cenários críticos de MySQL. O MCP server agrega valor real ao ecossistema Claude para recuperação de incidentes, transformando forensics de dados em tarefa acessível via IA.

README

A tradução para o português deste README ainda está na fila.

Point-in-time recovery for MySQL — no locks, no schema changes, no waiting for a restore.

Release License CI

SELECT * FROM orders WHERE id = 123 AS OF '2026-05-20 14:00:00'

— against production MySQL. That's the experience dbtrail makes possible.


dbtrail tails the binary log, keeps every row change with full before/after images in a searchable index, and turns "someone ran the wrong UPDATE" from a restore-from-backup incident into a two-minute fix:

  • 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
  • Time-travel — query any row (or table) as it was at any moment
  • From a web console — browse, recover, and add servers to monitor, all in the UI

It also ships an MCP server, so Claude (or any MCP client) can search your change 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 access to 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 for anything missing.

Get started

curl -fsSLO https://raw.githubusercontent.com/dbtrail/dbtrail/main/docker-compose.yml
docker compose up -d
docker compose logs -f bintrail

Nothing to configure. The logs end with your console URL:

Console is running — open it and add the MySQL servers to watch:

    http://127.0.0.1:8090/?token=ab12cd34…

Open it and click + Add server: paste the MySQL you want to watch — host, user, password — and dbtrail runs the preflight checks (failures come back as fix-this cards), provisions an index for it, and starts streaming. Watching events within the minute, and the terminal is already behind you.

The console binds to your machine only (127.0.0.1) and every request needs the access token — generated once and kept in the stack's volume, so the URL stays valid across restarts. Prefer signing in with a username and password? Set one and a login form replaces the token URL on your next visit (no restart needed):

docker compose exec -it bintrail bintrail-console user set-password

To reach the console from another machine, set a credential (the password above — ideally behind TLS) and publish the port; the console guide has the full auth, TLS, and reverse-proxy options.

The compose stack ships a pinned MySQL 8.4 container as the index store. That index holds the forensic record — it is your system of record, so back up its volumes (lose them and you re-index from scratch). dbtrail ships that MySQL but does not operate it: disk, backups, and upgrades are yours. Prefer your own? Set INDEX_DSN in .env to a MySQL 8.0+ you run and remove the bundled index services — dbtrail installs only its tables there, never operating the server. Either way, what's supported on each side is spelled out in SUPPORT.md; for an index that's operated for you, there's the managed service at dbtrail.com.

Other ways to install — plain Docker, .deb/.rpm, go install, source builds, and the binary quickstart: see docs/install.md.

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.

How it works

The index is self-contained: recovery never needs the original binlog files, and old partitions rotate out to Parquet files — on local disk or in any S3-compatible bucket (S3, MinIO, …); no cloud account needed. Queries read them transparently either way. Time-travel SQL (AS OF) is served by a MySQL-protocol shim behind ProxySQL — your clients keep speaking plain MySQL.

Documentation

Start hereReferenceOperations
InstallQuery & RecoveryDeployment · Capacity
QuickstartWeb consoleRotation & Status
DBA guideTime-Travel SQLDocker
30-second demoStreaming · 101 · IndexingUpload to S3
MCP server · MCP gatewayServer identity
Dump & Baseline · DDL trackingParquet debugging

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).

Ver o original no GitHub

Bom para

Relacionados