How can I download the latest backup from Heroku in a single line command. The code has recently changed and doesn't seem to be of much help. https://devcenter.heroku.com/articles/heroku-postgres-import-export
This creates a public url that i can open and download
$ heroku pg:backups public-url | cat
I need to use the curl command to download it, but it does not work
$ curl -o latest.dump heroku pg:backups public-url | cat
I have also tried to use the following and it could not resolve host.
heroku pg:backups capture && curl -o latest.dump `heroku pg:backups public-url | cat`
heroku pg:backups public-url && curl -o latest.dump `heroku pg:backups public-url | cat`
Please assist with the full command line.
Ran into the same issue but was able to figure out a workaround:
This will return a backup to something like b001
Returns url to dump