Get the Heroku db as detailed here: http://devcenter.heroku.com/articles/pgbackups#exporting_via_a_backup
- heroku pg:backups:capture # => b001
- heroku pg:backups:url <backup_num> # => backup_url
- get backup_num with cmd "heroku pg:backups" or with previous command
- curl -o latest.dump <backup_url>
Then locally do:
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump(your database must exist before can do this)