HACKER Q&A
📣 omair_inam

Schema aware partial relational database copy with subset of records


I'm looking to create a partial copy of a massive MySQL relational database. The DB is too large to be able to replicate fully.

I'm looking for a tool that would accept as inputs * a database * specification of relationships between the tables in the schema * a root set of records across one or more tables...

and it would copy over the root records and all related records into another MySQL database, resulting in a smaller, but functional copy of the database.

I recall seeing a tool feature in HN to do this, but despite searching for a while, I couldn't find it. Would appreciate any suggestions for appropriate tools from the community.


  👤 acemarke Accepted Answer ✓
I suspect you're looking for https://github.com/Wisser/Jailer .

(I'd seen it before as well, couldn't remember the name immediately, and googled for `sql database subset relation export tool` to find it again.)