I need to sync data from a local server to an Azure Cloud v2 storage account. I’m using the command azcopy sync “source server” “storage container “ —-delete-destination=true but the issue I’m facing is that empty folders are not managed correctly. In particular:
- if present in the source then they are not created in the destination
- renaming a folder in the source the destination structure is recreated leaving the previous folder empty
E.g. Initial situation in source and destination is a MainFolder containing a file 1.txt
The final situation in the source is a RenamedFolder containing the 1.txt file
I expect everything replicated at the destination instead I find: The RenamedFolder containing the 1.txt file (this is ok), The NewFolder is empty (this is not ok)
Of course, from website, I can create and remove empty folders (v2 account) but I need to sync a lot of data so I cannot do it manually.
Any idea how to solve it? Isn’t this supported in v2 storage accounts?
AzCopy syncdoes not support creating empty directories in Blob storage (Gen V2 storage account).AzCopy sync "source" "destination" --delete-destination=truedoes not delete empty directories.Even when I tried, I encountered the same issue in my environment, and it is still not creating empty directories or folders and not deleting empty directories:
Output:
Portal:
Currently, this feature is not supported in AzCopy. You can raise a new feature request through the GitHub link.