Questions

How to backup and restore database of django from one app to another app?

0

I have created a new django app on heroku and want to create a backup of the database.
After this I want to restore this database to newly created app.
How this can be achieved?



asked 1 year, 8 months ago
Reputation: 1





1 Answer

0

Create Backup

Let’s first create the backup of database of kodefork app.

$ heroku pg:backups:capture --app kodefork

heroku_pg_backups_kodefork.png

List all backups

To See the list of all the backups created for kodefork app

$ heroku pg:backups --app kodefork

list_backups_heroku_kodefork.png

Download the backup of database

$ heroku pg:backups:download

Restore Backup

To restore the backup b002 of kodefork app to kodefork-new app

$ heroku pg:backups:restore kodefork::b002 DATABASE_URL --app kodefork-new

heroku_rename_kodefork_new.png

answered 1 year, 8 months ago
Reputation: 1





Your Answer

Nothing to preview

Post Answer



Asked:  1 year, 8 months ago
Viewed:  433 times
Active:  1 year, 8 months ago