Skip to content

Instantly share code, notes, and snippets.

@suhanlee
Last active July 20, 2016 07:24
Show Gist options
  • Save suhanlee/c39ed03ae82cc0f3260ba5646d3a2b17 to your computer and use it in GitHub Desktop.
Save suhanlee/c39ed03ae82cc0f3260ba5646d3a2b17 to your computer and use it in GitHub Desktop.
heroku pg backup script
# check pg backup schedules
$ heroku pg:backups schedules
# unschedule
$ heroku pg:backups unschedule DATABASE_URL
# download backup file
$ curl -o latest.dump `heroku pg:backups public-url`
# restore db-backup-file
$ heroku pg:backups restore b101 DATABASE_URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment