Cloudfoundry:如何将mongodb数据迁移到2.0版

时间:2013-06-28 15:47:39

标签: migration cloudfoundry mlab

我目前正在将我的cloudfoundry应用程序从即将弃用的cloudfoundry 1.0版迁移到2.0版。

从命令行输出看,部署工作正常。 但是,我还需要迁移我当前的mongodb数据库内容。 我使用vmc tunnel mongodump成功转储了当前数据,但是,我无法将数据恢复到新数据库。

当我进入命令行时

cf tunnel mongolab-xxxMyAmazingApp mongorestore

我收到一条错误消息告诉我

Opening tunnel on port 10000... FAILED
CFoundry::NotStaged: 170002: App has not finished staging
For more information, see ~/.cf/crash

崩溃文件包含这些行

RESPONSE: [400]
RESPONSE_HEADERS:
  connection : keep-alive
  content-length : 61
  content-type : application/json;charset=utf-8
  date : Fri, 28 Jun 2013 15:27:56 GMT
  server : nginx
  x-content-type-options : nosniff
  x-vcap-request-id : fad06d99-6fe0-4544-b1d1-eff53cea3ddd
RESPONSE_BODY:
{
  "description": "App has not finished staging",
  "code": 170002
}
>>>

cfoundry-2.1.0/lib/cfoundry/baseclient.rb:160:in `handle_error_response'
cfoundry-2.1.0/lib/cfoundry/baseclient.rb:139:in `handle_response'
cfoundry-2.1.0/lib/cfoundry/baseclient.rb:87:in `request'
cfoundry-2.1.0/lib/cfoundry/baseclient.rb:64:in `get'
cfoundry-2.1.0/lib/cfoundry/v2/base.rb:53:in `instances'
cfoundry-2.1.0/lib/cfoundry/v2/app.rb:55:in `instances'
cfoundry-2.1.0/lib/cfoundry/v2/app.rb:201:in `running_instances'
cfoundry-2.1.0/lib/cfoundry/v2/app.rb:176:in `health'
cfoundry-2.1.0/lib/cfoundry/v2/app.rb:212:in `healthy?'
cf-2.1.0/lib/tunnel/tunnel.rb:97:in `helper_healthy?'
cf-2.1.0/lib/tunnel/tunnel.rb:25:in `open!'
cf-2.1.0/lib/tunnel/plugin.rb:41:in `tunnel'
interact-0.5.1/lib/interact/progress.rb:98:in `with_progress'
cf-2.1.0/lib/tunnel/plugin.rb:40:in `tunnel'
mothership-0.5.1/lib/mothership/base.rb:66:in `send'
mothership-0.5.1/lib/mothership/base.rb:66:in `run'
mothership-0.5.1/lib/mothership/command.rb:72:in `invoke'
mothership-0.5.1/lib/mothership/command.rb:86:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in `invoke'
mothership-0.5.1/lib/mothership/base.rb:55:in `execute'
cf-2.1.0/lib/cf/cli.rb:156:in `execute'
cf-2.1.0/lib/cf/cli.rb:167:in `save_token_if_it_changes'
cf-2.1.0/lib/cf/cli.rb:155:in `execute'
cf-2.1.0/lib/cf/cli.rb:101:in `wrap_errors'
cf-2.1.0/lib/cf/cli.rb:151:in `execute'
mothership-0.5.1/lib/mothership.rb:45:in `start'
cf-2.1.0/bin/cf:13
/usr/bin/cf:23:in `load'
/usr/bin/cf:23

那么我该怎么办才能解决这个问题?

1 个答案:

答案 0 :(得分:1)

检查此链接:

http://support.cloudfoundry.com/entries/24464207-Problem-creating-a-tunnel-to-elephantsql

  

嗨,由于现在通过第三方供应商在Cloud Foundry之外配置服务,因此没有必要使用隧道连接到它。要获取服务的连接详细信息,请登录https://console.run.pivotal.io并导航并在相关空间中查找配置。单击相关服务旁边的“管理”按钮将转到提供商主页,您可以在其中获取连接详细信息。

对于mongo服务是一样的。从https://mongolab.com/home您可以访问您的mongo服务。