Potresti semplicemente creare il tuo pg_dump direttamente dal tuo database Heroku.
Per prima cosa, ottieni la tua stringa postgres usando heroku config:get DATABASE_URL .
Cerca l'URL di Heroku Postgres (esempio:HEROKU_POSTGRESQL_RED_URL: postgres://user3123:example@sqldat.com:6212/db982398 ), il cui formato è postgres://<username>:<password>@<host_name>:<port>/<dbname> .
Quindi, esegui questo sulla tua riga di comando:
pg_dump --host=<host_name> --port=<port> --username=<username> --password --dbname=<dbname> > output.sql
Il terminale chiederà la tua password, quindi la eseguirà e la scaricherà in output.sql.
Quindi importalo:
psql -d my_local_database -f output.sql