-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot sync local dir with Azure Storage Emulator #554
Comments
Hi @rsheptolut, thanks for reaching out! Sync is indeed missing some flags that copy already has. We have plans to make up the difference. |
@zezha-msft Any changes to the status of this in 10.3.x or coming in 10.4? |
(Just asking to try to get right milestone tag on this issue, if possible) |
I'm very interested in the outcome on this. I need to be able to sync to a local emulator. |
Here's the offending code:
Credit to Gaurav Mantri-AIS for finding it. |
@zezha-msft Any news on that? We are running into the same problem. Since Shouldn't it be sufficient to switch the usage of azure-storage-azcopy/cmd/sync.go Line 145 in 87cba06
to azure-storage-azcopy/cmd/copy.go Line 272 in 87cba06
? Internally |
Encountering this bug with Azurite as well - the annoying part is that it mentions to use the --from-to flag, but then when providing the flag indicates Also, want to wish this issue an early 2nd birthday! 🎂 |
Apologies for not updating this thread sooner. Sync supports the from-to flag starting from v10.13.0 https://github.com/Azure/azure-storage-azcopy/blob/main/ChangeLog.md#version-10130 which was released Oct 2021. This should allow support for syncing a local dir with Azurite. I will go ahead and close this thread for now, but if you are still having any issues, please do re-open this thread or open a new one. Thank you again for your feedback |
Which version of the AzCopy was used?
AzCopy 10.2.1
Which platform are you using? (ex: Windows, Mac, Linux)
Windows
What command did you run?
azcopy sync "C:\LocalDir" "http://127.0.0.1:10000/devstoreaccount1/mycont?%SAS%"
What problem was encountered?
I get a following error:
error parsing the input given by the user. Failed with error Unable to infer the source 'C:\LocalDir' / destination 'http://127.0.0.1:10000/devstoreaccount1/mycont?%SAS%'.
It occurs because I'm trying to sync my local folder with Azure Blob Storage that runs locally in the emulator and its url doesn't contain anything hinting it's a blob storage. The error message does nothing to explain this.
How can we reproduce the problem in the simplest way?
mycont
in it, issue an SAS token for it.C:\LocalDir
folder with some files in it.Have you found a mitigation/solution?
The solution I've found is simply not using
sync
and settling withcopy
. This is a poor workaround, becausecopy
seems to always be overwriting all files and overall does not, you know, sync. The crucial difference that allowscopy
to work is the fact that it supports the--from-to
flag, and supplying--from-to LocalBlob
helps AzCopy to figure out what I'm trying to do. Again, no guidance on this anywhere inazcopy
help or docs. The following command works:azcopy copy"C:\LocalDir" "http://127.0.0.1:10000/devstoreaccount1/mycont?%SAS%" --from-to LocalBlob
The same flag doesn't work with
sync
:azcopy sync "C:\LocalDir" "http://127.0.0.1:10000/devstoreaccount1/mycont?%SAS%" --from-to LocalBlob
unknown flag: --from-to
Please add support for the
--from-to
flag to thesync
command as there's no reason for the command not to support it. Thesync
command is also missing a number of other flags thatcopy
has without any apparent reason, for example,--blob-type
.The text was updated successfully, but these errors were encountered: