Created
November 21, 2013 07:07
-
-
Save osulyanov/7577211 to your computer and use it in GitHub Desktop.
Heroku tips
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
# Set up heroku app | |
heroku git:remote -a app_name | |
# Create db backup | |
heroku pgbackups:capture | |
# Download last db backup | |
curl -o latest.dump `heroku pgbackups:url` | |
# Restore local base from Heroku | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump | |
# Add postgresapp path | |
PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH" | |
# Create far dump | |
pg_dump -U postgres -W -h localhost autoporta_production -F t -f dump.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment