4 ms·
This is way overcomplicated. All you actually have to do to grab your latest scheduled Postgres DB dump is run: curl -o latest.dump `heroku pg:backups public
by themgt 7y ago
This is way overcomplicated. All you actually have to do to grab your latest scheduled Postgres DB dump is run:
curl -o latest.dump `heroku pg:backups public-url -a [app]`
(and then pg_restore)
- mjw1007 7y agoHm, is the secrecy of that URL the only thing stopping someone else downloading the backup?
- haffla 7y agoIt looks like this https://xfrtu.s3.amazonaws.com/29577c2f-fd6c-4794-b7c5-4390uedghfrtf/2019-11-15T02%3A17%3A43Z/hktdg95r-04ad-4489-88c3-983eykjthgf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=IOAUSHJKFSUWFDSF%2F20191115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191115T111307Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=801eb84a9577da86e9de5df0b8676cbf3cf8d7d33764d5b326205071b332f43a https://xfrtu.s3.amazonaws.com/29577c2f-fd6c-4794-b7c5-4390u... I believe it expires after 1 hour (X-Amz-Expires=3600).
- SnowingXIV 7y agoNo, you'd have to be logged in with the CLI as a heroku user that has privileges to said database.
- haffla 7y agoor just `heroku pg:backups:download -a [app]` :)