Hello Mritunjay Singh,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are moving storage data from one region to another, but metadata is changing while using AzCopy.
First thing to do is to make sure you are using the latest version of AzCopy such as v10 not v8 and below, there is improvements or bug fixes related to metadata handling.
Yes, using the --preserve-metadata
will ensure that you are adding the --preserve-metadata
flag correctly during your AzCopy operations. For an instant use similar to:
azcopy copy "https://<source_storage_account>.blob.core.windows.net/<container_name>" "https://<destination_storage_account>.blob.core.windows.net/<container_name>" --recursive --preserve-metadata
Thirdly, case-sensitivity of metadata could be forcing metadata to lowercase. Azure Storage metadata is technically case-insensitive, but it’s still important to verify how the service is handling it. If the default AzCopy behavior is still changing the metadata to lowercase, using custom scripts via Azure CLI or PowerShell to get and set metadata explicitly could offer more granular control. For an example using Azure CLI:
# Get Metadata:
az storage blob metadata show --account-name <source_account> --container-name <container> --name <blob>
# Set Metadata:
az storage blob metadata update --account-name <destination_account> --container-name <container> --name <blob> --metadata key1=value1 key2=value2
Read more from the link below:
https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10?tabs=dnf
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.