Created
January 6, 2012 09:20
-
-
Save kagemusha/1569836 to your computer and use it in GitHub Desktop.
Revisions
-
kagemusha created this gist
Jan 6, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ Get the Heroku db as detailed here: http://devcenter.heroku.com/articles/pgbackups#exporting_via_a_backup 1. heroku pgbackups:capture 2. heroku pgbackups:url <backup_num> #=>backup_url - get backup_num with cmd "heroku pgbackups" 3. curl -o latest.dump <backup_url> Then locally do: $ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump (your database must exist before can do this)