Azure – Keeping a delta sync between Azure Storage blob containers

azurestoragesynchronization

I have three different Azure Storage blob containers that are used to serve website content, one for production, one for staging and one for development.

My goal is to sync staging and development on a daily or weekly basis so they match production.

I put together something in PowerShell that works in principal but it's slow and heavy handed. It involves deleting the staging and dev containers, then copying the entire production container twice. For just 20k items, this whole process takes over an hour.

Considering only a couple hundred items may change in a week, a delta operation would likely be done much faster.

Has anyone seen a tool or method that can do a delta copy between Azure Storage blob containers? I'll likely end up writing my own tool but wanted to see if there are any out there currently.

Best Answer

Unfortunately there isn't a good way to do this. As you have already seen tools like AZCopy will move the files for you, but they won't do a delta copy or sync.

You could do something yourself in PowerShell that ran through the blobs and checked if they exist in the destination and then compare something like the modified date or file hash, but I can't imagine that will be particularly quick either unfortunately.

Related Topic