恢复数据库时Heroku缺少必需的标志

时间:2019-04-15 00:54:22

标签: heroku heroku-postgres

我看到了几则SO帖子,尽管谷歌和heroku --help,我仍然遇到相同的错误

我一直在努力解决这个问题: https://devcenter.heroku.com/articles/heroku-postgres-import-export

$ heroku pg:backups:restore 'secure-file-location-url' DATABASE_URL --app heroku-app-name --confirm heroku-app-name
Starting restore of secure-file-location-url to postgresql-flat-47715... done

Use Ctrl-C at any time to stop monitoring progress; the backup will continue restoring.
Use heroku pg:backups to check progress.
Stop a running restore with heroku pg:backups:cancel.

Restoring... !
 ▸    An error occurred and the backup did not finish.
 ▸    
 ▸    waiting for restore to complete
 ▸    pg_restore finished with errors
 ▸    waiting for download to complete
 ▸    download finished with errors
 ▸    please check the source URL and ensure it is publicly accessible
 ▸    
 ▸    Run heroku pg:backups:info r018 for more details.
$ heroku pg:backups:info r018
 ›   Error: Missing required flag:
 ›     -a, --app APP  app to run command against
 ›   See more help with --help

我的secure-file-location-url是Google云端硬盘的公共链接,我可以在隐身浏览器窗口中访问它。

1 个答案:

答案 0 :(得分:1)

如评论中所述,您的数据库转储将托管在Google云端硬盘上,您所提供的链接将通过“下载文件”按钮转到查看器。

相反,您必须提供指向文件的直接链接。该文档建议使用Amazon S3。