我习惯了 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/