Follow below steps to restore database on Heroku.
1. Login to your Heroku as below and enter email id and password associated with Heroku.
$ heroku login
$ Enter email id
$ Enter password
Capture Backup
2. Use below commands to backup your database.
$ heroku pg:backups:capture --app testapp
This command will take/capture a backup of your database.
Download Captured Backup
3. If you want to download the captured backup use below command.
$ heroku pg:backups:capture --app testapp
Restore database on Heroku
4. Make a publicly accessible URL of your database as below.
http://www.dropbox.com/latest.dump
5. Now enter below command to restore the database.
$ heroku pg:backups:restore https://dropbox.com/latest.dump --app testapp
enter your application name on the place of "testapp" in all above commands.
No comments:
Post a Comment