Skip to content

Instantly share code, notes, and snippets.

@mrjman
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrjman/5abea699d143c26c0520 to your computer and use it in GitHub Desktop.
Save mrjman/5abea699d143c26c0520 to your computer and use it in GitHub Desktop.
Export database from heroku and import locally
curl -o `date +"%Y%m%d%H%M%S"_BACKUPFILENAME.dump `heroku pgbackups:url --app APPNAME`
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U PGUSERNAME -d LOCALDBNAME BACKUPFILENAME.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment