gpt4 book ai didi

ruby-on-rails - (来自Amazon S3的)BucketAlreadyOwnedByYou错误实际上是什么意思?我找不到任何影响我的理由

转载 作者:行者123 更新时间:2023-12-04 05:58:08 37 4
gpt4 key购买 nike

我正在使用Amazon S3备份我的Rails应用程序的mysql数据库。我使用astrails-safe插件来执行此操作,每当我尝试更新它时,都会收到“您成功创建命名存储桶的先前请求,并且您已经拥有它。(AWS :: S3 :: BucketAlreadyOwnedByYou)”错误。

我已经检查过要备份的文件夹是否已经在我的帐户中了。只是我不能从代码中上传文件(使用astrails-safe)。

好。当我运行这段代码


须藤黄芪安全
/用户/pww/sites/web_apps/myapp/trunk/lib/backup/local.rb


,出现以下错误。

/opt/local/lib/ruby/gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/error.rb:38:in `raise': Your previous request to create the named bucket succeeded and you already own it. (AWS::S3::BucketAlreadyOwnedByYou)
from /opt/local/lib/ruby/gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/base.rb:72:in `request'
from /opt/local/lib/ruby/gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/base.rb:88:in `put'
from /opt/local/lib/ruby/gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/bucket.rb:79:in `create'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/s3.rb:29:in `save'
from /opt/local/lib/ruby/1.8/benchmark.rb:308:in `realtime'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/s3.rb:28:in `save'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/sink.rb:8:in `process'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/backup.rb:15:in `run'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/backup.rb:12:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/backup.rb:12:in `run'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:53:in `safe'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:51:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:51:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:52:in `safe'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:46:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:46:in `safe'
from /Users/phyowaiwin/sites/web_apps/myapp/trunk/lib/backup/local.rb:1
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/bin/astrails-safe:50:in `load'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/bin/astrails-safe:50:in `main'
from /opt/local/lib/ruby/gems/1.8/gems/astrails-safe-0.2.7/bin/astrails-safe:53
from /opt/local/bin/astrails-safe:19:in `load'
from /opt/local/bin/astrails-safe:19


local.rb中的代码如下。

safe do

local do
path "/backup/:kind"
end


s3 do
key "mykey"
secret "mysecret"
bucket "myapp-local-backup"
path ":kind/:id" # this is default
end


keep do
local 100
s3 100
mysqldump 100
end

# backup mysql databases with mysqldump
mysqldump do
# you can override any setting from parent in a child:
options "-ceKq --single-transaction --create-options"

user "root"
password ""
# host "localhost"
# port 3306
socket "/tmp/mysql.sock"
database :myapp_development


end

tar do
options "-h" # uncomment this to dereference symbolic links

archive "myapp-local-com" do
files "~/sites/web_apps/myapp/branches"
end

end



end


任何帮助,将不胜感激!

谢谢。

最佳答案

我不知道为什么,但是创建带有“将这个水桶放入欧洲”选项的水桶似乎会导致此错误。当我创建一个没有该选项的新存储桶时,它现在可以正常工作。

顺便说一下,我正在使用S3 Firefox Organizer插件/附加组件来添加存储桶。

希望这也对遇到同样问题的人有所帮助。

干杯。

关于ruby-on-rails - (来自Amazon S3的)BucketAlreadyOwnedByYou错误实际上是什么意思?我找不到任何影响我的理由,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2569062/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com