I'm assuming you want to clone your current database to a new database that you've added onto your app?
Below, assume HEROKU_POSTGRESQL_PINK
is your original database, and HEROKU_POSTGRESQL_BROWN
is the new one you just added.
Then the steps you want to do are the following:
- backup your old database on your app
heroku pgbackups:capture HEROKU_POSTGRESQL_PINK
- restore your backup to your new database
URL=$(heroku pgbackups:url HEROKU_POSTGRESQL_PINK) && heroku pgbackups:restore HEROKU_POSTGRESQL_BROWN $URL
- it will ask you to confirm, you have to re-type the database name to confirm it.