I want to call heroku postgres backup/restore commands within a scheduled heroku task, but the heroku toolbelt isn\'t available from bash prompt, so I can\'t call heroku com
As Heather Piwowar said, you can indeed download and untar the heroku tollbelt yourself, but no need to move files around after this. Here is a shorter version:
curl -s https://s3.amazonaws.com/assets.heroku.com/heroku-client/heroku-client.tgz | tar xz
PATH="/app/heroku-client/bin:$PATH"
You can now use the heroku
command as you wish.
For authentification, you may want to set the HEROKU_API_KEY
env var (using heroku config:set HEROKU_API_KEY=1234567890 -a your-app-name
).
Also, note that the first use of the heroku
command will run longer than expected because it will try to install the latest version, dependencies and core plugins.