pgbackups错误:备份网址无效?

时间:2014-02-18 12:17:02

标签: postgresql heroku restore dump

我正在尝试使用以下命令从本地数据库的转储中恢复heroku postgres数据库:

heroku pgbackups:restore HEROKU_POSTGRESQL_MAROON_URL 'https://s3-eu-west-1.amazonaws.com/my-app-data/test.dump' --app my-app

我明白这一点:

HEROKU_POSTGRESQL_MAROON_URL (DATABASE_URL)  <---restore---  test.dump

 !    WARNING: Destructive Action
 !    This command will affect the app: smc-staging
 !    To proceed, type "my-app" or re-run this command with --confirm my-app

进入my-app后,我明白了:

←[0KRetrieving... done

 !    An error occurred and your restore did not finish.
 !    The backup url is invalid. Use `pgbackups:url` to generate a new temporary URL.

我正在运行Windows 7,使用pg_dumps进行备份,并上传到S3,heroku --version让我:

heroku/toolbelt/3.3.0 (i386-mingw32) ruby/1.9.3

请帮忙!

1 个答案:

答案 0 :(得分:1)

您可以将您的网址粘贴到浏览器中并获取您期望的文件吗?我怀疑该文件不公开。相反,我会建议这样的东西来恢复最新的临时备份:

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

或者这样可以恢复特定的旧备份:

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