I would like to create a ERM-Diagram from a PostgreSQL Database which is hosted on heroku.
The database itself is almost 20 GB big, which makes downloading the whole dump not an option.
Is there a way to simply backup and download the schema including foreign keys, and maybe 10 rows of each table in the database, which could subsequently be restored into a local dabase via the psql-command?
I have the PG Backups Plus addon enabled, but that seems to only enable me to dump the whole database with the complete dataset.
Use pg_dump instead. The
--schema-only|-soption does just what you’re looking for.Then just manually grab a bit of data that you want. There’s no easy way, that I know of or seen, around that.