dbsurveyor
Fast, offline database schema discovery and sampling. Understand unfamiliar databases quickly with portable reports.
dbsurveyor is a two-part toolchain (collector + postprocessor) for fast database schema discovery and limited data sampling across engines like PostgreSQL, MySQL/MariaDB, MSSQL, SQLite, and MongoDB. The collector runs where credentials are valid and produces a portable .dbsurveyor.json(.zst/.enc) file; the postprocessor works fully offline to generate reports, diagrams, and reconstructed SQL.
Highlights
- Schema + sample extraction with throttle control
- Portable outputs with optional compression and AES-GCM encryption
- Markdown/JSON reports and SQL reconstruction; Pro adds diagrams, classification, HTML
- Rust static binaries; no telemetry; human-inspectable outputs
- Pluggable engine adapters with feature flags or plugins
Usage
Collect on the target (connected to DB):
dbsurveyor-collect --engine postgres --dsn postgresql://user:pass@host:5432/db --out survey.dbsurveyor.json.zst
Process offline:
# Markdown report
dbsurveyor report survey.dbsurveyor.json.zst --out report.md
# Reconstruct CREATE TABLE SQL
dbsurveyor reconstruct survey.dbsurveyor.json.zst --out schema.sql
Key Features
Schema Discovery
Fast extraction of database schemas with intelligent sampling to avoid overwhelming target systems.
Portable Outputs
Generate reports in multiple formats (Markdown, JSON, SQL) with optional compression and encryption.
Offline Processing
Complete analysis can be performed offline once the initial data collection is done.
Multi-Engine Support
Works with PostgreSQL, MySQL/MariaDB, MSSQL, SQLite, and MongoDB databases.
Ready to Get Started?
Download dbsurveyor and start using it in your environment.