如何使用blobxfer从azure blob存储下载子目录

时间:2017-02-28 07:16:42

标签: linux azure azure-storage-blobs

我使用的是ubuntu 64bit 14.04。如何使用blobxfer将子目录从Azure blob存储下载到本地计算机。假设我有一个名为MY_STORAGE_ACCOUNT的存储帐户,名称为MY_CONTAINER的容器以及容器内的以下内容。

directory1/directory2/directory3/file1 
directory1/directory2/directory3/file2
directory1/directory2/directory3/file3
..
..
directory1/directory2/directory3/fileN

我只想下载子目录directory3

我有一个SAS密钥,可以访问并可以下载单个文件,但通配符不起作用。我的命令如下所示

blobxfer --saskey "$MYSASKEY" MY_STORAGE_ACCOUNT MY_CONTAINER "$LOCAL_DIR"  --download --remoteresource "directory1/directory2/directory3/*

我收到以下错误,可能说它无法理解命令中的通配符。

requests.exceptions.HTTPError: 404 Client Error: The specified blob does not exist.

1 个答案:

答案 0 :(得分:5)

请试试这个:

org.springframework.util.IdGenerator

当您使用SAS密钥时,请确保SAS中包含# Get solution folder $PathToSolution = "C:\Some\Path\SolutionFolder" # find all packages under the solution folder $configs = gci $PathToSolution -Filter packages.config -recurse # get content of every package config file $configs.fullname | %{[xml]$packages = Get-Content $_; $packages.packages.package | foreach{ # Get pacakge attributes $packageId=$_.id; $packageVersion=$_.version; # Build the path from the build attributes $Path="$PathToSolution\packages\$packageId.$PackageVersion"; Write-output $Path}} 权限。

相关问题