如何使用卷发从Minio S3存储桶下载文件
我正在尝试从Minio S3存储桶下载文件夹的内容。
我正在使用以下命令。
我可以使用特定文件使用特定文件
# aws --endpoint-url http://s3:9000 s3 cp s3://mlflow/3/050d4b07b6334997b214713201e41012/artifacts/model/requirements.txt .
,但如果尝试下载文件夹的所有内容,则下面会引发
# aws --endpoint-url http://s3:9000 s3 cp s3://mlflow/3/050d4b07b6334997b214713201e41012/artifacts/model/* .
fatal error: An error occurred (404) when calling the HeadObject operation: Key "3/050d4b07b6334997b214713201e41012/artifacts/model/*" does not exist
错误
I am trying to download contents of a folder from a minio s3 bucket.
i am using the following command.
I am able to download a specific file using
# aws --endpoint-url http://s3:9000 s3 cp s3://mlflow/3/050d4b07b6334997b214713201e41012/artifacts/model/requirements.txt .
But the below throws an error if it try to download all the contents of the folder
# aws --endpoint-url http://s3:9000 s3 cp s3://mlflow/3/050d4b07b6334997b214713201e41012/artifacts/model/* .
fatal error: An error occurred (404) when calling the HeadObject operation: Key "3/050d4b07b6334997b214713201e41012/artifacts/model/*" does not exist
Any help will be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是一个脚本文件,使用
curl
和openssl
从Minio服务器使用中下载文件:
脚本content
download_minio.sh
:justintimperio在github on github on github 创建
Here is a script file that uses
cURL
andopenssl
to download a file from a MinIO serverUsage:
Script content
download_minio.sh
:Originaly created by JustinTimperio on Github
我终于能够通过运行
一个我遇到的一个问题来获得它,因为我必须使用PIP安装使用AWS-CLI,因为这是我可以使用的唯一方法。
I was finally able to get it by running
The one problem i ran into was i had to use the aws-cli using pip install as that's the only way i could the --recursive option to work.
您也可以使用
minio客户端
并在minio
命令上设置一个别名。这是官方文档展示如何显示如何显示如何显示如何显示使用minio客户端
的Docker版本实现此目的:您可以在任何操作系统上安装客户端。
完成后,要从S3复制内容,您只需要这样做:
You could also use the
minio client
and set an alias onminio
command. Here is an example taken from the official documentation showing how to achieve this using the docker version ofminio client
:You can instead install the client on any OS.
Once done, to copy content from s3 you would only have to do this: