Skip to content

Instantly share code, notes, and snippets.

@AKNiazi
Created December 19, 2014 07:10
Show Gist options
  • Save AKNiazi/91159bbdcba42b17feb1 to your computer and use it in GitHub Desktop.
Save AKNiazi/91159bbdcba42b17feb1 to your computer and use it in GitHub Desktop.
Import Data from Heroku to Local Machine
IMPORTING DATA FROM HEROKU TO LOCAL MACHINE
Install the Heroku Backup tool
$ heroku addons:add pgbackups
Start using it
$ heroku pgbackups:capture
Download the remote db on Heroku (to your local machine) using curl
$ curl -o latest.dump `heroku pgbackups:url`
Load it*
$ pg_restore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment