Reputation: 120
Been trying to pull my remote db into local env with heroku pg:pull, prior without problems, but at this point the command is returning this:
/bin/sh: pg_dump: command not found
▸ pg_dump errored with 127
pg_restore: [custom archiver] could not read from input file: end of file
looked for an answer here and updated the bash profile as some topics mention:
export PATH=/Applications/Postgres.app/Contents/Versions/10/bin:$PATH
rebooted and restarted terminal, but with no avail. anyone knows what's going on?
Upvotes: 2
Views: 759
Reputation: 2281
Update your Heroku CLI; the issue where Postgres.app paths weren't being handled correctly was just fixed. https://github.com/heroku/cli/pull/1074
Upvotes: 0
Reputation: 2321
Ypsql tries to interpret SQL queries while you are adding it a compressed dump (heroku use this).
When You can not read the dump, pg_restore -O latest.dump gives you valid SQL you may pipe to psql
the easiest here :
pg_restore -O -d app_development latest.dump
Imporatant:
Try Use -O you may not use the random username of your remote heroku postgres db.
Check this link for more help here stackoverflow.com/a/11391586/6392696
Upvotes: 3