【发布时间】:2020-07-23 20:30:32
【问题描述】:
我正在使用此命令在本地创建转储
PGPASSWORD=admin pg_dump -h 127.0.0.1 -p 5432 -U postgres --no-owner --no-acl -f database.dump 和我的创建成功。
然后将此转储上传到保管箱并通过此链接将其公开 http://www.dropbox.com/s/rsqeiuqzusejz5x/database.dump?dl=1 注意我已将 https 更改为 http 和 dl=0 更改为 dl=1 (dl=1 使其可下载)
然后在我的终端上运行这个命令heroku pg:backups:restore "http://www.dropbox.com/s/38prh2y7pdwhqqj/database.dump?dl=1" --confirm tranquil-anchorage-39635
但我收到此错误
! An error occurred and the backup did not finish.
!
! pg_restore: error: did not find magic string in file header
! waiting for restore to complete
! pg_restore finished with errors
! waiting for download to complete
! download finished successfully
!
! Run heroku pg:backups:info r010 for more details.
我已经尝试了所有官方文档和各种答案,但似乎没有任何效果。
【问题讨论】:
标签: python django postgresql heroku django-rest-framework