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
You can use Heroku Scheduler and configure the following command (as an example) to create a database backup:
curl -s https://s3.amazonaws.com/assets.heroku.com/heroku-client/heroku-client.tgz \
| tar xz && ./heroku-client/bin/heroku pg:backups:capture -a you-app-name-here
For this to work, you need to add a Config Variable named HEROKU_API_KEY and set its value to the "API Key" value from your Accounts page.