Created
October 17, 2011 20:52
-
-
Save aitor/1293763 to your computer and use it in GitHub Desktop.
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
| # Because you know, db:pull is fucking slow... | |
| function backup:pull () { | |
| name=$(heroku info --raw | grep "^name=" | cut -d= -f2) | |
| echo "Loading '$name' app's data in local database." | |
| heroku pgbackups:capture --expire | |
| curl -o latest.dump `heroku pgbackups:url` | |
| pg_restore --verbose --clean --no-acl --no-owner -d $name latest.dump | |
| rm -fr latest.dump | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment