Microsoft File Share Storage Sync

91 views Asked by At

Is there a way to sync files that are saved either locally or in GitLab to the Microsoft File Shares storage? So I want it to be unidirectional local -> File Shares storage.

I did not find anything yet. I know there is a way to do it when using a Blob storage, via the azcopy sync command.

A way to do it is to delete all files first and then use the az storage file upload-batch command but this is way too cumbersome and ugly.

I even checked the rclone cli but this is also not possible for the Microsoft File Shares storage.

Am I missing something? This is ridiculous...

1

There are 1 answers

0
Georgios On

I finally found the answer:

Syntax

azcopy sync '<local-directory-path>' 'https://<storage-account-name>.file.core.windows.net/<file-share-name><SAS-token>' --recursive --delete-destination 'true'

Example from Documentation:

azcopy sync 'C:\myDirectory' 'https://mystorageaccount.file.core.windows.net/myfileShare?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-07-04T05:30:08Z&st=2019-07-03T21:30:08Z&spr=https&sig=CAfhgnc9gdGktvB=ska7bAiqIddM845yiyFwdMH481QA8%3D' --recursive --delete-destination 'true'