I have created a postgresql dump of my local database,however it contains sensitive data. I don’t want to make it public in Amazon S3 as per the instructions on Heroku (Export & Import data) state.
This is what I am trying to do to restore the database:
heroku pgbackups:restore HEROKU_POSTGRESQL_DB_URL 'https://s3.amazonaws.com/mylink/mydb.dump'
HEROKU_POSTGRESQL_DB_URL <---restore--- mydb.dump
! WARNING: Destructive Action
! This command will affect the app: app-name
! To proceed, type "app-name" or re-run this command with --confirm app-name
> app-name
Retrieving... done
! An error occurred and your restore did not finish.
! The backup url is invalid. Use `pgbackups:url` to generate a new temporary URL
If I make the dump public in Amazon S3, it works.
Is there a safe way to to import this dump into the Heroku’s postgresql database?
Connect directly to your Heroku database via tools like PGAdmin and restore it directly into the database. Use the output of
heroku configto get your database URL to get the credentials you need.