How do I transfer production database to staging on Heroku using pgbackups? Getting error

后端 未结 12 2168
刺人心
刺人心 2021-01-30 03:13

On Heroku, I am trying to copy the production database into my staging app using the pgbackups addon. I followed the instructions on the addon page: https://devcenter.heroku.com

12条回答
  •  北海茫月
    2021-01-30 03:36

    To transfer (copy) the production database (source database) to the staging database (target database) you will need to invoke pg:copy from the target application, referencing a source database.

    heroku pg:copy source-application::OLIVE HEROKU_POSTGRESQL_PINK -a target-application

    Another example:

    heroku pg:copy my-production-app::HEROKU_POSTGRESQL_OLIVE HEROKU_POSTGRESQL_PINK --app my-staging-app

    To obtain the colour names of your databases, use:

    heroku pg --app my-production-app
    heroku pg --app my-staging-app
    

    See pg:copy

提交回复
热议问题