snippetsqlMinor
How can I export a subset of tabledata from a prodution database into my local testing database?
Viewed 0 times
fromlocalcanintotabledatadatabasetestingexporthowprodution
Problem
We have a relatively big production postgres based db: ~20GB.
The PostgreSQL database is hosted on heroku.
I would like to copy a small subset of the table data to my local database so I can run some tests on them without having to work on production.
I do not want to generate sample data myself, but rather use the data which already exists in the production environment.
~100 rows from each table in the database would be sufficient.
Is there an easy way to accomplish this?
The PostgreSQL database is hosted on heroku.
I would like to copy a small subset of the table data to my local database so I can run some tests on them without having to work on production.
I do not want to generate sample data myself, but rather use the data which already exists in the production environment.
~100 rows from each table in the database would be sufficient.
Is there an easy way to accomplish this?
Solution
I haven't used this tool, but Jailer promises to do just that
Database Subsetting and Browsing Tool. Exports consistent, referentially intact row-sets from relational databases (JDBC)
http://sourceforge.net/projects/jailer/
Database Subsetting and Browsing Tool. Exports consistent, referentially intact row-sets from relational databases (JDBC)
http://sourceforge.net/projects/jailer/
Context
StackExchange Database Administrators Q#29267, answer score: 4
Revisions (0)
No revisions yet.