Skip to content

Instantly share code, notes, and snippets.

@nimitmaru
Last active December 23, 2015 11:49
Show Gist options
  • Save nimitmaru/6630936 to your computer and use it in GitHub Desktop.
Save nimitmaru/6630936 to your computer and use it in GitHub Desktop.
#!/bin/bash
heroku pgbackups:capture
curl -o latest.dump `heroku pgbackups:url`
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U user_name -d db_name latest.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment