简体   繁体   English

Microsoft 文件共享存储同步

[英]Microsoft File Share Storage Sync

Is there a way to sync files that are saved either locally or in GitLab to the Microsoft File Shares storage?有没有办法将保存在本地GitLab中的文件同步到Microsoft 文件共享存储? 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.我知道在使用Blob存储时有一种方法可以通过azcopy sync命令来实现。

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.一种方法是先删除所有文件,然后使用az storage file upload-batch命令,但这太麻烦和丑陋了。

I even checked the rclone cli but this is also not possible for the Microsoft File Shares storage.我什至检查了rclone cli,但这对于Microsoft 文件共享存储也是不可能的。

Am I missing something?我错过了什么吗? This is ridiculous...这是荒唐的...

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'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM