microsoft / AzureTipsAndTricks

Learn some of our favorite Azure tips and tricks—some long-standing, and new ones that have recently been added to become more productive with Azure. Star the repo now to shave hours off your coding tasks tomorrow.
http://azuredev.tips
Creative Commons Attribution 4.0 International
1.49k stars 489 forks source link

Tip81 (azcopy) is outdated #77

Closed Styxxy closed 4 years ago

Styxxy commented 4 years ago

The information in tip81 is outdated and doesn't work with AzCopy V10 (that is even mentioned at the top of the page). Maybe add a "warning" block at the top to indicate this.

Link: https://microsoft.github.io/AzureTipsAndTricks/blog/tip81.html Source: https://github.com/microsoft/AzureTipsAndTricks/blob/master/blog/tip81.md

mbcrump commented 4 years ago

@Styxxy - can this tip be updated? or would it be best to remove the tip?

Styxxy commented 4 years ago

@Styxxy - can this tip be updated? or would it be best to remove the tip?

@mbcrump I am not sure, I think it will have to be rewritten. The provided commands with /Source and /SourceKey don't work anymore. Deleting might be a little harsh, though I would definitely mark it as obsolete.

Currently (with azcopy v10) you will get following errors:

PS C:\Users\myuser> $key = "mykey"
PS C:\Users\myuser> AzCopy /Source:https://xyz.blob.core.windows.net/images /Dest:C:\mytest /SourceKey:$key /Pattern:"test.png"
Error: unknown command "/Source:https://xyz.blob.core.windows.net/images" for "azcopy"
Run 'azcopy --help' for usage.

unknown command "/Source:https://xyz.blob.core.windows.net/images" for "azcopy"

PS C:\Users\hdm> AzCopy /Source:C:\mytest /Dest:https://xyz.blob.core.windows.net/images /DestKey:$key /Pattern:"test.png"
Error: unknown command "/Source:C:\\mytest" for "azcopy"
Run 'azcopy --help' for usage.

unknown command "/Source:C:\\mytest" for "azcopy"

Commands that could be used are for example: az storage blob upload-batch -s . -d images. For using the storage keys, you would need to work with environment variables like AZURE_STORAGE_CONNECTION_STRING (that's what I found and use for the moment).

mbcrump commented 4 years ago

If you do a pull request and add the text then I'll accept it.

mbcrump commented 4 years ago

I'll update the tip. Thx!

Styxxy commented 4 years ago

@mbcrump I'll update the tip. Thx!

Ok, I didn't come around yet to do it.