nabroleonx

Extract a slice of your production database to reproduce bugs locally. Point dbslice at a record, it follows foreign keys and gives you a complete, importable subset

27
0
100% credibility
Found Feb 20, 2026 at 12 stars 2x -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

dbslice extracts small, self-contained subsets of production database data while preserving table relationships for local development and debugging.

How It Works

1
🔍 Spot the data puzzle

You're debugging a pesky bug that needs real customer data from your huge live database, but copying everything is impossible.

2
📦 Pick up dbslice

Grab this simple tool designed to pull just the tiny piece of data you need for testing.

3
🔗 Connect your database

Link it to your working database so it can see what's inside without changing anything.

4
🎯 Choose your key records

Pick the exact customer order or user that caused the issue as your starting point.

5
🔄 Let it find connections

It smartly gathers all related info like customers, products, and payments, keeping everything perfectly linked.

6
💾 Get your data file

Receive a clean file with only your needed data, safe and anonymized if you want.

Test and fix easily

Load the small dataset into your local setup, reproduce the bug instantly, and solve it without hassle.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 12 to 27 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is dbslice?

dbslice is a Python CLI tool that extracts a minimal slice of your production database, starting from a seed record like an order ID or failed status filter, then traverses foreign keys to grab all related data while keeping referential integrity intact. You get a complete, importable subset as SQL, JSON, or CSV—perfect for reproducing bugs locally without dumping gigabytes of prod data. Think numpy extract slice or fiji extract slice from stack, but for databases: point at a bug-related record and get a self-contained dump.

Why is it gaining traction?

Zero-config schema introspection means no YAML models or hours of setup like Jailer or slice-db—install via pip or uv, run one command like `dbslice extract postgres://... --seed "orders.id=123" > subset.sql`. Built-in anonymization fakes emails/SSNs safely, streaming handles 100K+ rows without OOM, and it auto-breaks cycles via nullable FKs. Beats alternatives with Python speed, multi-format output, and virtual FKs for Django GenericForeignKeys.

Who should use this?

Backend engineers debugging elusive prod bugs that vanish locally, like payment failures tied to user history or order cascades. Django/Postgres teams needing prod-like fixtures without full DB copies. QA devs scripting reproducible test data from real incidents, or anyone tired of manual "extract github data" hacks for database slicing centerline issues.

Verdict

Grab it for Postgres bug hunts—early alpha (10 stars, 1.0% credibility) with solid docs and pre-commit hygiene, but watch for MySQL/SQLite support. Test on non-critical DBs first; it'll save hours once mature.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.