AZcopy help for sync two destination using database mapping

HemantSudehely-0557 266 Reputation points
2022-09-26T19:29:14.433+00:00

Hi,
I need your help as new to AZ copy.
I have on -primise file share server and blob storage where client storing same files. Now I need to sync azure blob storage with on-prem by using AZCopy tool.
On-prem structure workflow – on-prem server have Attachment folder for each environment with 0-99 sub folders. Now whenever system generate loan like 100000367, all the documents associated to loan goes to last 2-digit folder (for “100000367”, all documents file go in 67 folder which loanid folder and then store all files in it.)
244907-sync-1-on-prem.png

Azure storage workflow - have Attachment container for each environment with 0-99 sub virtual folders. Now whenever system generate loan like 100000367, all the documents associated to loan goes to last 2-digit folder (for “100000367”, all documents’ files go in 67 virtual folder which loanid virtual folder and then store all files in it.).
244864-sync-1-on-blob.png

System storing this folder structure mapping of each file in client database table like loanid – parent folderid-child folder and files

Parent folder id folderid filename Storage type
67 100000367 File1.pdf, File2.xml On-prem
67 100000367 File1.pdf, File2.xml, File3.jpg Blob storage

Is there a way to script AZCopy tool to perform file to file mapping and sync both environment for each client with the help of mapping stored in database?
Any suggestion on tool or script for reference would great help…

Note - client is not using azure file share due to cost constraint, and hence azure file sync is not an option.

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
Windows for business | Windows Server | User experience | PowerShell
{count} votes

Answer accepted by question author
  1. Sumarigo-MSFT 47,506 Reputation points Microsoft Employee Moderator
    2022-10-06T05:15:39.37+00:00

    @HemantSudehely-0557 You can use virtual directories with the blob service. In other words, there’s no need to create the virtual directories explicitly, you just name your blobs accordingly.

    For example, if you name your blob /container/dir1/dir2/file.txt, you have virtual directories called dir1 which has a sub virtual directory dir2.

    I guess I still don’t understand why you are looking for mapping.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.