首页 > 解决方案 > Heroku 数据库恢复失败,说多个应用程序,但应用程序包含在恢复命令中

问题描述

这是控制台,您可以在其中看到我包含并确认了该应用程序

Ryans-MacBook-Pro:ereader-authors Ryan$ heroku pg:backups:restore 'https://www...._july2018.backup' HEROKU_POSTGRESQL_AQUA_URL --app ereader-authors-staging --confirm ereader-authors-staging
Starting restore of https://www...._july2018.backup to gazing-merrily-7879... 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 r008 for more details.
Ryans-MacBook-Pro:ereader-authors Ryan$ heroku pg:backups:info r008
 ›   Error: Multiple apps in git remotes
 ›      Usage: --remote staging
 ›         or: --app ereader-authors-staging
 ›      Your local git repository has more than 1 app referenced in git remotes.
 ›      Because of this, we can't determine which app you want to run this command against.
 ›      Specify the app you want with --app or --remote.
 ›      Heroku remotes in repo:
 ›      ereader-authors (heroku)
 ›   ereader-authors-staging (staging)
 ›
 ›      https://devcenter.heroku.com/articles/multiple-environments

这曾经有效,我保存了这个命令。

这个网站让我打字更明显,所以我不能提交这个问题。当您尝试发布控制台输出时,此添加更多详细信息错误令人讨厌,他们应该真正修改他们这样做的方式,因为有时您真的不需要对命令行进行大量解释。

标签: postgresqlheroku

解决方案


如果其他人遇到此错误,Heroku 给出的错误是不正确的,我拥有的 URL 是一个公共共享,它决定提供一个网页而不是文件。该应用程序与它无关,我切换了主机然后它工作了。


推荐阅读