Skip to content

Instantly share code, notes, and snippets.

@rupurt
Last active May 10, 2016 16:52
Show Gist options
  • Select an option

  • Save rupurt/b29f0dc6498ea33cbf19a95020730f65 to your computer and use it in GitHub Desktop.

Select an option

Save rupurt/b29f0dc6498ea33cbf19a95020730f65 to your computer and use it in GitHub Desktop.
heroku pg:backups -r production # list existing backups
curl -o a123.dump `heroku pg:backups public-url a123 -r production` # pull the backup down locally
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d AppName_enviroment a123.dump
# Or even quicker
heroku pg:backups restore `heroku pg:backups public-url a123 -r sk-git-remote` DATABASE_URL -r sk-git-remote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment