Reputation: 3019
I am trying to load test db from a file store locally (db.sql), using
heroku run pg_restore -d foo db.sql
the error message I am getting says:
Error: You must install at least one postgresql-client-<version> package.
I tried to do sudo apt-get postgresql-client-9.4.1
, and get:
bash: sudo: command not found
and without sudo
, I get:
E: Invalid operation postgresql-client-9.4.1
Upvotes: 0
Views: 325
Reputation: 18090
You need to use a locally-installed pg_restore
to restore your data into the Heroku-hosted database.
I usually run something like this:
pg_restore --verbose --clean --no-acl --no-owner -h [host address] -p [port] -U [username] -d [name] [file path]
More info here: PostgreSQL Backup and Restore Commands
Upvotes: 2