简体   繁体   English

仅在检索期间出现重复性错误:boto.exception.NoAuthHandlerFound

[英]duplicity error only during retrieve: boto.exception.NoAuthHandlerFound

When attempting to retrieve a file that was backed up to a DigitalOcean S3 compatible instance using these commands...当尝试使用这些命令检索备份到 DigitalOcean S3 兼容实例的文件时...

$ source "$HOME/.duplicity/.env_variables.conf"
$ sudo duplicity --verbosity notice --encrypt-sign-key=$GPG_KEY --log-file ~/.duplicity/info.log --file-to-restore <path to file> s3://sfo2.digitaloceanspaces.com/<my server> <path to file>

...I get this error... ...我收到此错误...

boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials

...even though as of last night the nightly backups are still successful using this bash script... ...即使截至昨晚,使用此 bash 脚本的夜间备份仍然成功...

#!/bin/bash

HOME=<my home path>
source "$HOME/.duplicity/.env_variables.conf"
...
sync_results=`duplicity \
    --verbosity notice \
    --asynchronous-upload \
    --encrypt-sign-key="$GPG_KEY" \
    --log-file "$HOME/.duplicity/info.log" \
    /srv/samba/share \
    s3://sfo2.digitaloceanspaces.com/<my server>`
...

A month ago that retrieval command was successful.一个月前,检索命令成功。 So something has changed since.所以从那以后有些事情发生了变化。 The error points to an issue with credentials but both the command and the bash script source from the same .env file that contain the credentials.该错误表明凭据存在问题,但命令和 bash 脚本均来自包含凭据的同一 .env 文件。

All my research so far points to this being a boto issue, but until now I haven't had to touch boto to make things work correctly.到目前为止,我所有的研究都表明这是一个 boto 问题,但直到现在我还没有触摸 boto 来使事情正常工作。

Any ideas?有任何想法吗?

PS: configuration details... PS:配置细节...

Local machine: Ubuntu 20.04 LTS, duplicity 0.8.12
DigitalOcean:  Ubuntu 18.04 LTS, duplicity 0.8.23

EDIT: mis-referenced cloud provider编辑:错误引用的云提供商

might be caused by an upgrade to duplicity 0.8.23 which changed the default s3 backend to boto3.可能是由于升级到 duplicity 0.8.23 将默认 s3 后端更改为 boto3。 this changed how s3 access, especially with different end points, needs to be set up.这改变了需要设置 s3 访问的方式,尤其是对于不同端点的访问。

you can check if using boto+s3:// mitigates the issue, if so you may decide to stick with it or adapt to boto3+s3:// which is now the default for the alias s3://您可以检查使用 boto+s3:// 是否可以缓解问题,如果是这样,您可能会决定坚持使用它或适应 boto3+s3:// 现在是别名 s3:// 的默认设置

the current0.8.23 man page reads当前的0.8.23 手册页内容为

boto3 backend example backup command line: boto3后端示例备份命令行:

AWS_ACCESS_KEY_ID=<key_id> AWS_SECRET_ACCESS_KEY=<access_key> duplicity /some/path s3:///bucket/subfolder AWS_ACCESS_KEY_ID=<key_id> AWS_SECRET_ACCESS_KEY=<access_key> 重复/some/path s3:///bucket/subfolder

you may add --s3-endpoint-url (to access non Amazon S3 services or regional endpoints) and may need --s3-region-name (for buckets created in specific regions) and other --s3-... options documented above.您可以添加 --s3-endpoint-url (用于访问非 Amazon S3 服务或区域终端节点)并且可能需要 --s3-region-name (用于在特定区域创建的存储桶)和其他 --s3-... 记录的选项以上。

legacy boto backend example backup command line:遗留 boto 后端示例备份命令行:

AWS_ACCESS_KEY_ID=<key_id> AWS_SECRET_ACCESS_KEY=<access_key> duplicity /some/path boto+s3://[host:port]/bucket/subfolder AWS_ACCESS_KEY_ID=<key_id> AWS_SECRET_ACCESS_KEY=<access_key> 重复 /some/path boto+s3://[host:port]/bucket/subfolder

The url host setting is optional and allows to define a custom endpoint host. url 主机设置是可选的,允许定义自定义端点主机。 you may add --s3-european-buckets and other s3 options documented above if needed.如果需要,您可以添加 --s3-european-buckets 和上面记录的其他 s3 选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM