AZ复制删除文件失败

发布于 2025-02-12 14:31:44 字数 1604 浏览 2 评论 0原文

当我尝试从 fileshare中删除带有子文件夹和文件的文件夹时,删除文件的AZCOPY 使用 azcopy v10

我的AZ复制命令如下

azcopy rm https:// storage-account-name> .file.core.core.windows.net/< file-share-name>/systemsCheduledjobs-22-22-06-06-06-01吗? < sas-token> - recursive = true

我遇到的错误是

恐慌:不一致的路径分离器。有些是前进的,有些回来了。这不支持。

和堆栈跟踪,

goroutine 565 [running]:
github.com/Azure/azure-storage-azcopy/v10/common.DeterminePathSeparator({0xc0071c6d00, 0x3e})
        /home/vsts/work/1/s/common/extensions.go:140 +0x97
github.com/Azure/azure-storage-azcopy/v10/common.GenerateFullPath({0x0, 0x0}, {0xc0071c6d00, 0x3e})
        /home/vsts/work/1/s/common/extensions.go:155 +0xe5
github.com/Azure/azure-storage-azcopy/v10/common.GenerateFullPathWithQuery({0x0, 0x248f909e0be}, {0xc0071c6d00, 0xb85c3d}, {0x0, 0x0})
        /home/vsts/work/1/s/common/extensions.go:172 +0x34
github.com/Azure/azure-storage-azcopy/v10/ste.(*JobPartPlanHeader).TransferSrcDstStrings(0x248f8ec0000, 0x1853)
        /home/vsts/work/1/s/ste/JobPartPlan.go:181 +0x28f
github.com/Azure/azure-storage-azcopy/v10/ste.(*jobPartMgr).ScheduleTransfers(0xc000029500, {0x17c3190, 0xc0005b2000})
        /home/vsts/work/1/s/ste/mgr-JobPartMgr.go:418 +0x692
github.com/Azure/azure-storage-azcopy/v10/ste.(*jobMgr).scheduleJobParts(0xc0007a3880)
        /home/vsts/work/1/s/ste/mgr-JobMgr.go:851 +0x3e
created by github.com/Azure/azure-storage-azcopy/v10/ste.NewJobMgr
        /home/vsts/work/1/s/ste/mgr-JobMgr.go:180 +0x9a6

如果有人能够对此问题提供更多洞察力,我将非常感激。

The azcopy to remove files failed when I tried to remove a folder with subfolders and files from a fileshare with azcopy v10.

My az copy command was as follows

azcopy rm https://<storage-account-name>.file.core.windows.net/<file-share-name>/SystemScheduledJobs-22-06-01?<sas-token> --recursive=true

The error which I was getting is

panic: inconsistent path separators. Some are forward, some are back. This is not supported.

and the stack trace

goroutine 565 [running]:
github.com/Azure/azure-storage-azcopy/v10/common.DeterminePathSeparator({0xc0071c6d00, 0x3e})
        /home/vsts/work/1/s/common/extensions.go:140 +0x97
github.com/Azure/azure-storage-azcopy/v10/common.GenerateFullPath({0x0, 0x0}, {0xc0071c6d00, 0x3e})
        /home/vsts/work/1/s/common/extensions.go:155 +0xe5
github.com/Azure/azure-storage-azcopy/v10/common.GenerateFullPathWithQuery({0x0, 0x248f909e0be}, {0xc0071c6d00, 0xb85c3d}, {0x0, 0x0})
        /home/vsts/work/1/s/common/extensions.go:172 +0x34
github.com/Azure/azure-storage-azcopy/v10/ste.(*JobPartPlanHeader).TransferSrcDstStrings(0x248f8ec0000, 0x1853)
        /home/vsts/work/1/s/ste/JobPartPlan.go:181 +0x28f
github.com/Azure/azure-storage-azcopy/v10/ste.(*jobPartMgr).ScheduleTransfers(0xc000029500, {0x17c3190, 0xc0005b2000})
        /home/vsts/work/1/s/ste/mgr-JobPartMgr.go:418 +0x692
github.com/Azure/azure-storage-azcopy/v10/ste.(*jobMgr).scheduleJobParts(0xc0007a3880)
        /home/vsts/work/1/s/ste/mgr-JobMgr.go:851 +0x3e
created by github.com/Azure/azure-storage-azcopy/v10/ste.NewJobMgr
        /home/vsts/work/1/s/ste/mgr-JobMgr.go:180 +0x9a6

I would be really grateful if anyone could provide more insight into this issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江城子 2025-02-19 14:31:44

我尝试使用PowerShell命令在环境中重现我成功的结果。

powerShell命令

azcopy rm https://<storage-account-name>.file.core.windows.net/<file-share-name>/<path>?<sas-token> --recursive=true 

输出:

“在此处输入图像说明”

* fileshare url (https://&&&&lt; storage-account-name&gt; .file.core.windows.net/&lt; file-share-name&gt;/&gt;/&gt; path&gt; path; path;)

“在此处输入图像说明”

在存储帐户级别的SAS令牌。

请用URL中的路径检查一次,然后尝试再次复制。

参考:

azcopy删除|微软文档

I tried to reproduce in my environment using the powershell command I got result successfully.

Powershell command

azcopy rm https://<storage-account-name>.file.core.windows.net/<file-share-name>/<path>?<sas-token> --recursive=true 

Output:

enter image description here

*FileShare Url (https://<storage-account-name>.file.core.windows.net/<file-share-name>/<path>)

enter image description here

SAS Token at Storage Account level..
enter image description here

kindly check once with path in your url and try to reproduce once again.

Reference:

azcopy remove | Microsoft Docs

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文