Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use AzCopy to synchronize local files to Azure Blob storage

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

At present, more and more companies in China have chosen to use Azure. They store some data in Azure Blob storage for distributed access, and at the same time, eliminate the hidden danger of data loss caused by local hardware failure.

However, in the actual production environment, there are some requirements to synchronize local data to the cloud, or cloud data to local, and AzCopy v10 released by Microsoft perfectly addresses this requirement. Let's take a look at how to use AzCopy v10 to synchronize the file system to Azure Blob storage.

To synchronize Blob files locally, run the following command:

.\ azcopy sync "https://azfile.blob.core.chinacloudapi.cn/111?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-06-04T08:46:15Z&st=2019-06-04T00:46:15Z&spr=https&sig=ODGkLHnnRgp6hEw7yYhOljvUrJkjfW0OGyeW37aioX0%3D"" D:\ a "--recursive=true

On the contrary:

.\ azcopy sync "D:\ a"https://azfile.blob.core.chinacloudapi.cn/111?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-06-04T08:46:15Z&st=2019-06-04T00:46:15Z&spr=https&sig=ODGkLHnnRgp6hEw7yYhOljvUrJkjfW0OGyeW37aioX0%3D"-- recursive=true"

If you want to run this script on a regular basis, you can set up scheduled tasks on Windows:

1. Set the Powershell execution policy to RemoteSigned

Set-ExecutionPolicy RemoteSigned

2. Create a scheduled task in the scheduled task

3. The test is completed.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report