Skip to content

Instantly share code, notes, and snippets.

@johno
Created February 23, 2017 18:22
Show Gist options
  • Save johno/6aa68d8cb1884ca3415f0060f478c7bb to your computer and use it in GitHub Desktop.
Save johno/6aa68d8cb1884ca3415f0060f478c7bb to your computer and use it in GitHub Desktop.
Grab the latest pg copy for a heroku app
#!/usr/bin/env sh
_now=$(date +"%s")
heroku pg:backups capture --app $1
curl -o $_now-$1.dump `heroku pg:backups public-url --app $1`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment