我需要将约 2TB 的备份文件发送到 S3。我想最轻松的选项是 Linux scp 命令(有困难 https://stackoverflow.com/questions/5774808/s3cmd-failed-too-many-times使用 s3cmd 并且不希望 java/RoR 这样做)。
但是我不确定是否可能:How to use S3's private and public key with scp, and don't Know What would be my destination IP/url/path?
我很欣赏你的提示。
截至 2015 年,不支持 SCP/SSH(由于其他答案中提到的原因,可能永远不会支持)。
用于将文件复制到 S3 或从 S3 复制文件的官方 AWS 工具
-
命令行工具 https://aws.amazon.com/cli/ (pip3 install awscli
) - 注意需要指定凭据,我更喜欢通过环境变量而不是文件:AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
.
aws s3 cp /tmp/foo/ s3://bucket/ --recursive --exclude "*" --include "*.jpg"
- http://docs.aws.amazon.com/cli/latest/reference/s3/index.html http://docs.aws.amazon.com/cli/latest/reference/s3/index.html
和一个类似 rsync 的命令:
aws s3 sync . s3://mybucket
- http://docs.aws.amazon.com/cli/latest/reference/s3/sync.html http://docs.aws.amazon.com/cli/latest/reference/s3/sync.html
-
网页界面:
- https://console.aws.amazon.com/s3/home?region=us-east-1 https://console.aws.amazon.com/s3/home?region=us-east-1
非 AWS 方法
任何其他解决方案都依赖于第三方可执行文件(例如 botosync、jungledisk...),只要它们受支持,它们就可以很好。但随着时间的推移,第三方工具会不断出现和消失,您的脚本的保质期也会缩短。
- https://github.com/ncw/rclone https://github.com/ncw/rclone
编辑:实际上,AWS CLI 基于 botocore:
https://github.com/boto/botocore https://github.com/boto/botocore
因此,作为一位元老政治家,botosync 应该得到比我更多的尊重。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)