Ommadawn
Ommadawn

Reputation: 2730

Is there an Azure cli for these AWS cli sentences?

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!

Upvotes: 0

Views: 198

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136336

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://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?

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

Upvotes: 2

Related Questions