我正在尝试将我的重复安装配置为备份到一个亚马逊S3桶。我一直得到一个BackendException错误,没有进一步的细节。
编辑:我从这个问题中删除了Duply配置,以便更多地隔离这个问题,并在一个小目录(10 MB,34个文件)上切换到一个简单的、重复的命令。
下面是我试图运行的命令:
duplicity full ./logs "s3://s3-us-east-1.amazonaws.com/bucketname" -v9这是输出:
root@ats:/var/ats# duplicity full ./logs "s3://s3-us-east-1.amazonaws.com/bucketname" -v9
Duplicity 0.6 series is being deprecated:
See http://www.nongnu.org/duplicity/
Using archive dir: /root/.cache/duplicity/876c7d0b54276e675d41f6ea6077d52f
Using backup name: 876c7d0b54276e675d41f6ea6077d52f
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.ftpsbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.~par2wrapperbackend Succeeded
Using temporary directory /tmp/duplicity-sQ3sGs-tempdir
Backend error detail: Traceback (most recent call last):
File "/usr/local/bin/duplicity", line 1509, in <module>
with_tempdir(main)
File "/usr/local/bin/duplicity", line 1503, in with_tempdir
fn()
File "/usr/local/bin/duplicity", line 1336, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py", line 1062, in ProcessCommandLine
backup, local_pathname = set_backend(args[0], args[1])
File "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py", line 955, in set_backend
globals.backend = backend.get_backend(bend)
File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py", line 163, in get_backend
return _backends[pu.scheme](pu)
File "/usr/local/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 163, in __init__
self.resetConnection()
File "/usr/local/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 189, in resetConnection
raise BackendException(err.message)
BackendException
BackendException:我已经用这个脚本测试了Boto (这是S3连接的双重用途):
root@ats:/var/ats# python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto.s3
>>> conn = boto.s3.connect_to_region("us-east-1")
>>> bucket = conn.get_bucket("bucketname")
>>> for key in bucket.list(): print key, key.storage_class
...
<Key: bucketname,test.txt> STANDARD
>>> exit()我已经确保我正在运行最新的适当版本的欺骗和python,并且我已经设置了AWS_*变量,这些变量在Boto中运行得很好。
我是不是遗漏了什么?我该怎么办?
发布于 2015-07-10 18:46:28
我不知道为什么原来的命令不起作用,但最后我发现将s3://s3-us-east-1.amazonaws.com/bucketname格式更改为s3+http://bucketname解决了问题。
减少的工作命令现在是:
duplicity full ./logs "s3+http://bucketname" -v9发布于 2015-07-13 18:45:12
如果您仍然无法使它工作,尝试添加:export S3_USE_SIGV4="True"到您的duply conf文件。
这是详细描述的这里,并为我工作。
发布于 2016-05-29 07:14:17
SIGV4和s3+http解决方案对我都不起作用。
我的解决方案是在URL中使用区域名称,而不是泛型's3‘。就我而言,这是欧盟-西方-1(爱尔兰)。
这看起来像是:
s3://s3-eu-west-1.amazonaws.com/bucketname
而不是:
s3://s3.amazonaws.com/bucketname
尽管第二个通用URL可以在其他工具(如s3cmd )中工作,但它并不适用于欺骗性/ Boto。
如果您使用的是法兰克福或新加坡这样的新地区,您可能需要将此解决方案与Joe的答案结合起来。
https://serverfault.com/questions/704442
复制相似问题