Created
September 18, 2013 05:30
-
-
Save glsignal/6604923 to your computer and use it in GitHub Desktop.
Download a snapshot of all Postgres instances associated with your Heroku apps, installing the pgbackups in the process.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| heroku apps | sed -e "s/^===.*$//" | sed "/^$/d" | cut -d " " -f 1 | while read f; do echo $f && heroku addons:add pgbackups --app $f ; heroku pgbackups:capture --app $f && curl -o "${f} $(date).pgbackup" $(heroku pgbackups:url --app $f); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment