Skip to content

Instantly share code, notes, and snippets.

@dradford
Forked from codesoda/heroku_database_restore.txt
Last active August 29, 2015 14:00
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 dradford/152b4d0ed7a3e817b963 to your computer and use it in GitHub Desktop.
Save dradford/152b4d0ed7a3e817b963 to your computer and use it in GitHub Desktop.
$ heroku pgbackups:capture -r ... --expired
$ heroku pgbackups:url b001
$ heroku pgbackups:restore DATABASE 'http://s3.amazonaws.com/.....mydb.dump?authparameters'
$ pg_restore --verbose --clean --no-acl --no-owner -h myhost -U myuser -d mydb latest.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment