Ruby 请问 backup-aliyun 那个插件还能用吗?我这里一直报错

babodx · 2014年02月08日 · 最后由 babodx 回复于 2014年02月09日 · 2836 次阅读

我想用 backup 那个 gem 来做备份。 本来尝试备份到七牛的,但是七牛那个插件在 backup v4 下好像无法工作。 就换 aliyun 这个插件了。 写好配置以后,运行 backup perform -t guohuaxh 然后就出现了下面的错误提示

[2014/02/08 04:25:33][error] Model::Error: Backup for Description for guohuaxh (guohuaxh) Failed!
[2014/02/08 04:25:33][error] --- Wrapped Exception ---
[2014/02/08 04:25:33][error] Errno::EPIPE: Broken pipe
[2014/02/08 04:25:33][error]
[2014/02/08 04:25:33][error] Backtrace:
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/protocol.rb:199:in `write'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/protocol.rb:199:in `write0'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/protocol.rb:173:in `block in write'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/protocol.rb:190:in `writing'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/protocol.rb:172:in `write'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1938:in `send_request_with_body'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1920:in `exec'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1318:in `block in transport_request'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1317:in `catch'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1317:in `transport_request'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:1294:in `request'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/request.rb:176:in `block in transmit'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/net/http.rb:746:in `start'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/rest-client-1.6.7/lib/restclient.rb:80:in `put'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/carrierwave-aliyun-0.2.1/lib/carrierwave/storage/aliyun.rb:54:in `put'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-aliyun-0.1.1/lib/backup/storage/aliyun.rb:38:in `block (2 levels) in transfer!'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-aliyun-0.1.1/lib/backup/storage/aliyun.rb:37:in `open'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-aliyun-0.1.1/lib/backup/storage/aliyun.rb:37:in `block in transfer!'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-aliyun-0.1.1/lib/backup/storage/aliyun.rb:33:in `each'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-aliyun-0.1.1/lib/backup/storage/aliyun.rb:33:in `transfer!'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-4.0.0/lib/backup/storage/base.rb:35:in `perform!'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-4.0.0/lib/backup/model.rb:269:in `each'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-4.0.0/lib/backup/model.rb:269:in `block in perform!'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-4.0.0/lib/backup/model.rb:268:in `each'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-4.0.0/lib/backup/model.rb:268:in `perform!'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-4.0.0/lib/backup/cli.rb:153:in `perform'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/gems/backup-4.0.0/bin/backup:5:in `<top (required)>'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/bin/backup:23:in `load'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/bin/backup:23:in `<main>'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
[2014/02/08 04:25:33][error]   /home/babo/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'

我是 debian 系统,ruby 采用的 1.9.3

应该提交 issues,github 会发邮件提醒给维护者。issues 也好管理进度。

感谢,我去提交个 issues

这是网络连接的问题,注意内外外网的开关

感谢。 aliyun.aliyun_internal = 'true' 配置后,成功了。

不过我采用了默认的杭州站点,要用青岛的站点,好像没有配置的地方。只能在 carrierwave-aliyun 里面设置吧?

#4 楼 @babodx 那个我还没试过,carrierwave 里面倒是实现了的

@huacnlee 我已经提交更新了,您看看是否可以。我在本地测试了,可以正常使用青岛站点了. https://github.com/babodx/backup-aliyun

需要 登录 后方可回复, 如果你还没有账号请 注册新账号