Created
June 19, 2012 13:29
-
-
Save aitor/2954178 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