News for hackers. Stuff that matters.

Ask HN: 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.

( 2 comments | on HN )
Re:Ask HN: Schema aware partial relational database copy wit... by acemarke on Saturday February 12, 2022 @11:52AM (#30314177)
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.)

Re:Ask HN: Schema aware partial relational database copy wit... by omairinam on Friday February 25, 2022 @01:57PM (#30470789)
Yes. That was it. Thanks @acemarke.