Created
November 2, 2014 21:18
-
-
Save rinti/c52ba822e0ee2a74aedf to your computer and use it in GitHub Desktop.
Get latest database backup from Heroku, and add it to your development database. Assumes your database name is the same as the directory name.
This file contains 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
#!/bin/bash | |
dropdb ${PWD##*/} && createdb ${PWD##*/} && heroku pgbackups:url | xargs curl > latest.dump && pg_restore -d ${PWD##*/} latest.dump --clean --no-acl --no-owner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment