I downloaded the latest copy of my heroku database using
$ curl -o latest.dump `heroku pg:backups public-url --app myapp`
And this gives a file with the following type on my local machine:
$ file db/latest.dump db/latest.dump: PostgreSQL custom database dump - v1.12-0
I am trying to import this into my local Postgres database (my_db) using psql. However, I get a lot of errors:
$ psql my_db < db/latest.dump ... psql:db/latest.dump:119425: invalid command \?A~??ά£b?{
The psql -f db/latest.dump my_db does not work the same way.
What needs to be done to import this file locally into a new database with the same schema, etc.?
tyler source share