azure - 这些 AWS cli 语句有 Azure cli 吗?

标签 azure amazon-s3 azure-blob-storage azure-cli

我习惯了 AWS 和 aws cli (aws-shell),所以如果想将名为 images 的文件夹的内容上传到某个存储桶,我用于在 aws-shell 中输入:

s3 cp ./images/ s3://mybucket.com/images/ --recursive --exclude "*" --include "*.jpg" --acl public-read --storage-class STANDARD --content-type "image/jpeg"

我必须迁移到 Azure blob,但我不知道该怎么做。更重要的是,什么相当于 aws-shell 来做到这一点? azure-cli?

谢谢!

最佳答案

要在 Azure Blob 存储中上传文件夹,您要使用的 AZ CLI 命令是 az storage blob upload-batch .

其他选项是使用 azcopy专门为执行各种 blob 操作而设计的工具。您可以在此处找到使用 azcopy 上传文件和文件夹的示例:https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-blobs-upload?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json

More over, what would be the equivalent to aws-shell to do that? azure-cli?

这是正确的。其他选项是使用 Azure PowerShell Cmdlets .

关于azure - 这些 AWS cli 语句有 Azure cli 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73674550/

相关文章:

django - 我应该如何在 Django 应用程序中使用 AAD 实现用户 SSO(使用 Django Microsoft 身份验证后端模块)?

apache-spark - S3并行读写性能?

node.js - Amazon S3 getObject() 收到 NodeJS 拒绝的访问

python - 是否可以使用 Python SDK 检查特定 Azure blob 上是否有租约?

azure - 使用托管标识从逻辑应用程序进行身份验证来调用 Azure 函数

azure - 如何修复 Azure CI 上的控制台日志编码问题?

azure - 将应用服务证书与 Service Fabric 结合使用

java - AWS无法计算MD5哈希Android

用于计时器触发 blob 存档的 Azure Functions "The operation has timed out."

azure - 获取 CloudBlob.DownloadToFileParallelAsync 的进度