BucketAlreadyOwnedByYou 错误(来自 Amazon S3)实际上意味着什么?我找不到任何影响我的原因
我正在使用 Amazon S3 备份 Rails 应用程序的 mysql 数据库。我正在使用 astrails-safe 插件来执行此操作,每当我尝试更新它时,都会收到“您之前创建命名存储桶的请求已成功,并且您已经拥有它。(AWS::S3::BucketAlreadyOwnedByYou)”错误。
我已检查我要备份的文件夹是否已存在于我的帐户中。只是我无法从代码上传文件(使用astrails-safe)。
好的。当我运行这段代码时
sudo astrails-安全 /Users/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
任何帮助将不胜感激!
谢谢。
I am using Amazon S3 to back up my Rails app's mysql database. And I am using astrails-safe plugin to do that and I got the "Your previous request to create the named bucket succeeded and you already own it. (AWS::S3::BucketAlreadyOwnedByYou)" error back whenever I try to update it.
I have checked that the folder in which I am going to back up is there in my account already. It's just that I can't upload the files from the code (using astrails-safe).
ok. When I run this code
sudo astrails-safe
/Users/pww/sites/web_apps/myapp/trunk/lib/backup/local.rb
, I got the following error.
/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
The code in local.rb is as follow.
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
Any help would be appreciated!
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道为什么,但使用“将此存储桶放置在欧洲”选项创建存储桶似乎会导致此错误。当我创建一个没有该选项的新存储桶时,它现在工作正常。
顺便说一句,我正在使用 S3 Firefox Organizer 插件/插件来添加存储桶。
希望这对遇到同样问题的人也有帮助。
干杯。
I don't know why but creating the bucket with the option "Place this bucket in Europe" is causing this error, it seems. When I create a new bucket without that option it works fine now.
I am using S3 Firefox Organiser plugin/addon to add the buckets, by the way.
Hope this helps with people with same issue too.
Cheers.