Add option to fully synchronise blobs on azure with local folder content
See original GitHub issueId 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:
- Created 6 years ago
- Reactions:3
- Comments:13 (8 by maintainers)
Top GitHub Comments
The sync command is in CLI.
Try that like: az storage blob sync -c containerName –account-name accountName -s directory/path -d sync/path
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?