문제

We're having trouble with the heroku fork command so are manually trying to create a staging environment. I tried creating a new database off of a backup from our prod db but the created db has no rows and is only 6.4MB. The actual backup is 15.7 GB.

I did this via the web console clicking "restore".

Whats the right way to do this?

도움이 되었습니까?

해결책

From the command line, you want to do:

heroku pgbackups:restore DATABASE -a example-staging `heroku pgbackups:url -a example`

We use this command every few days, whenever we want the staging database to be replaced with the production database. This comes from: https://devcenter.heroku.com/articles/migrate-heroku-postgres-with-pgbackups#transfer-to-target-database

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top