我有一个发布管道。在其中,我添加了一项任务Azure CLI
。在这里,我选择2.0
预览作为任务版本。对于脚本类型,我选择了PowerShell
。现在,我想要的东西。
我有2个存储帐户,它们都位于同一订阅中。
每个存储都有一个容器。
现在,data1
包含名为test
的文件夹。我想将此test
文件夹复制到data2
容器中。
在那个Azure CLI
PowerShell
中,这就是我所做的:
.\AzCopy.exe /Source:"https://storage1.blob.core.windows.net/data1" /Dest:"https://storage2.blob.core.windows.net/data2" /SourceKey:"storage1keyhere" /DestKey:"storage2keyhere" /Pattern:"*"
这只是告诉我在发行日志中根本没有文件被复制。为什么它根本不复制任何内容?我也尝试使用/S
而不是/Pattern:"*"
,但是在那种情况下,它只是挂起,没有日志,什么也没用,大约20分钟,我已经厌倦了等待。
我如何进行这项工作?代理人是Hosted VS2017
。
在docs之后,我想对--recursive
进行讨论
azcopy copy 'https://<source-storage-account-name>.blob.core.windows.net/<container-name>/<directory-path><SAS-token>' 'https://<destination-storage-account-name>.blob.core.windows.net/<container-name>' --recursive