本文介绍了AzCopy同步命令失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在发出此命令:

azcopy sync "D:\Releases\Test\MyApp" "http://server3:10000/devstoreaccount1/myapp?sv=2019-02-02&st=2020-06-24T03%3A19%3A44Z&se=2020-06-25T03%3A19%3A44Z&sr=c&sp=racwdl&sig=REDACTED"

...并且我收到此错误:

...and I'm getting this error:

我会以为我的消息来源很清楚.

I would have thought my source was pretty clear.

有人可以看到我的语法有什么问题吗?

Can anyone see anything wrong with my syntax?

推荐答案

我相信您遇到了azcopy的问题,该问题不支持本地仿真器(至少对于同步命令而言).同样在Github上有一个未解决的问题: https://github.com/Azure/azure-storage-azcopy/issues/554 .

I believe you have run into an issue with azcopy that it does not support local emulator (at least for sync command). There's an open issue on Github for the same: https://github.com/Azure/azure-storage-azcopy/issues/554.

基本上,问题出在以下 code ,在存储仿真器URL的情况下,它以Unknown的形式返回位置:

Basically the issue is coming from the following lines of code, where it returns location as Unknown in case of storage emulator URLs:

func inferArgumentLocation(arg string) common.Location {
    if arg == pipeLocation {
        return common.ELocation.Pipe()
    }
    if startsWith(arg, "http") {
        // Let's try to parse the argument as a URL
        u, err := url.Parse(arg)
        // NOTE: sometimes, a local path can also be parsed as a url. To avoid thinking it's a URL, check Scheme, Host, and Path
        if err == nil && u.Scheme != "" && u.Host != "" {
            // Is the argument a URL to blob storage?
            switch host := strings.ToLower(u.Host); true {
            // Azure Stack does not have the core.windows.net
            case strings.Contains(host, ".blob"):
                return common.ELocation.Blob()
            case strings.Contains(host, ".file"):
                return common.ELocation.File()
            case strings.Contains(host, ".dfs"):
                return common.ELocation.BlobFS()
            case strings.Contains(host, benchmarkSourceHost):
                return common.ELocation.Benchmark()
                // enable targeting an emulator/stack
            case IPv4Regex.MatchString(host):
                return common.ELocation.Unknown()//This is what gets returned in case of storage emulator URL.
            }

            if common.IsS3URL(*u) {
                return common.ELocation.S3()
            }
        }
    }

    return common.ELocation.Local()
}

这篇关于AzCopy同步命令失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-25 23:28