Home > Software engineering >  Is there an Azure cli for these AWS cli sentences?
Is there an Azure cli for these AWS cli sentences?

Time:09-11

I'm used to AWS and aws cli (aws-shell), so if want to upload the content of a folder called images to a certain bucket, I used to type this in the aws-shell:

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

I have to migrate to Azure blobs and I don't know how to do that. More over, what would be the equivalent to aws-shell to do that? azure-cli?

Thanks!

CodePudding user response:

To upload a folder in Azure Blob Storage, the AZ CLI command you would want to use is az storage blob upload-batch.

Other option would be to use azcopy tool which is designed specifically for performing various blob operations. You can find examples of uploading files and folders using azcopy here: https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-blobs-upload?toc=/azure/storage/blobs/toc.json

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

That's correct. Other option would be to use Azure PowerShell Cmdlets.

  • Related