question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to fully synchronise blobs on azure with local folder content

See original GitHub issue

Id like a command to syncronise a container etc to a local directory tree while setting the contentType for all files. Options exist to upload files to plobs in the CLI. This could be an option to the azure blob upload-batch

That means it should remove blobs that no longer appear as files in the local directory tree. I have found no such option or other portable CLI tool to do this (not even the old AzCopy). this is critical in applications including a static web site.

The main use case is using blob storage for a static web site and updateing automatically from script for continuous deployment. During rapid iterations the structure can vary and cruft will get left around if blobs are only added. That has a cost impact. This use case also require #1436

With out this option the CD will have to delete all the blobs before uploading. That will require getting a list of blobs, or simply recreating the container, which will lose meta data.

There is also minor security issue with the blobs served over http. Unwanted resources may be addressable when they should not be there at all.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
limingucommented, May 22, 2019

The sync command is in CLI.

Try that like: az storage blob sync -c containerName –account-name accountName -s directory/path -d sync/path

4reactions
DouglasHeriotcommented, Aug 1, 2018

With the new Azure static website hosting, this would be even more helpful. I’d like to script my deployment process, and have it only upload files that have changed, and delete files that no longer need to be there. https://azure.microsoft.com/en-us/blog/azure-storage-static-web-hosting-public-preview/

@troydai I see this was added to a previous sprint but never completed. Should it be put back on the backlog, or even better, scheduled to a future sprint?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Synchronize with Azure Blob storage by using AzCopy v10
You can synchronize local storage with Azure Blob storage by using the AzCopy v10 command-line utility. You can synchronize the contents of ...
Read more >
Synchronize Files to Azure Blob Storage with AZCopy
Version 10 of AZCopy.exe can now delete files at the destination to keep it in complete sync with the source. This video shows...
Read more >
Set up Azure File Sync to Sync On-Prem to Azure [Step-by-Step]
Prerequisites · Creating an Azure File Share · Create a File Share Directory · Configure Azure File Sync. Creating the Storage Sync Service;...
Read more >
Cloud Sync - Synology Knowledge Center
Microsoft Azure: Select a server, input the Blob Storage Access key, ... All directories and files within this folder will be synced to...
Read more >
Sync Folder with Azure Blob Storage - Thomas Maurer
With AzCopy v10 the team added a new function to sync folders with Azure Blob Storage. This is great if you have a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found