I currently have a PostgreSQL production database running on a separate Heroku dinar.
I would like to deploy a simple shell script on another dyno (for a number of reasons), which, among other things, will reset the database every 2 weeks.
I tried using the commands herokuand psqlto connect to my database in my script, but unfortunately I am getting the following errors:
$ heroku pg:psql DATABASE_URL
bash: heroku: command not found
This makes sense because the Heroku toolbelt is not installed on the heroku announcer.
And then:
$ psql -h DATABASE_HOST -p
Error: You must install at least one postgresql-client-<version> package
Unfortunately, you cannot do simple apt-get install postgresql-clientbecause Heroku does not allow you to install packages. (You will get the following error):
~ $ apt-get install postgresql-client
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
? , python script pip , , script .
.