Open gapra-msft opened 7 months ago
This looks good, and thank you, but some formatting repair is needed here.
Could you take another look? I adjusted based on your comments.
The CLI switch still needs code formatting, as well as the full successful command syntax.
Looks good... did you see my comment over on the old ticket?
Could it be possible that we're looking in the wrong place, that maybe azcopy sync
itself needs the attention?
Thanks for adding that detail, we'll be sure to consider that in this investigation.
Very good, thank you.
This is a copy of a request from @InteXX from an issue https://github.com/Azure/azure-storage-azcopy/issues/1031. Creating a separate issue to track the investigation of the following and documentation.
Firstly, the SAS generator in Azure Storage Explorer generates incorrect URL syntax for a successful azcopy sync session when connecting to Azurite. Granted that's probably beyond the scope of this repo, but users still need to know this fact. The URL that's generated is in the form:
http://<hostname>:10000/devstoreaccount1/data?<SAS>
This is incorrect. The syntax should be instead:http://devstoreaccount1.<hostname>:10000/data?<SAS>
For this to work the DNS record must exist, e.g. assuming we're hosting Azurite on server5 the hostname will be devstoreaccount1.server5. This can be an entry in the local hosts file as well—as long as the supplied hostname resolves to the machine that's hosting Azurite.Also, this CLI switch is mandatory:
--from-to=LocalBlob
In the end, my complete successful command was:azcopy sync "D:\Dev\Data" "http://devstoreaccount1.server5:10000/data/?sv=2018-03-28&spr=https%2Chttp&st=2024-01-25T00%3A26%3A20Z&se=2024-01-26T00%3A26%3A20Z&sr=c&sp=rwl&sig=a0xAslzjcTzZQ55z6RRrNULXGGp2af90xXF42lm3Z2M%3D" --from-to=LocalBlob
That's what is unclear in the documentation, in both online and CLI usage sources... the proper URL syntax to use when connecting locally to Azurite. All of the provided examples assume a remote connection with Azure.I've searched the online documentation here for any mention of Azurite and I'm coming up empty. Nor am I finding Azurite syntax in the CLI usage text.
These documentation oversights may extend to other azcopy commands as well; I haven't looked. Perhaps a significant overhaul is in order—I'll of course leave that judgment to you and your team.
Let me know if you have any questions about my findings on the matter. Thank you for your consideration.