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 Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,771 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,501 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,416 questions
{count} votes

Accepted answer
  1. Sumarigo-MSFT 44,096 Reputation points Microsoft Employee
    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