[英]Upload multiple files in Azure Blob Storage from Linux
有没有办法从Linux机器上将多个文件上传到Azure Blob存储,使用终端或应用程序(基于Web还是不基于Web)?
Thank you for your interest – There are two options to upload files in Azure Blobs from Linux: 感谢您的关注 - 从Linux Blob中上传文件有两种方法:
Setup and use XPlatCLI by following the steps below: 按照以下步骤设置和使用XPlatCLI:
Use one of the third party web azure storage explorers like CloudPortam: http://www.cloudportam.com/ . 使用CloudPortam等第三方Web azure存储资源管理器之一: http ://www.cloudportam.com/。 You can find the full list of azure storage explorers here: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx .
您可以在此处找到azure存储资源管理器的完整列表: http : //blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx 。
If you prefer the commandline and have a recent Python interpreter, the Azure Batch and HPC team has released a code sample with some AzCopy-like functionality on Python called blobxfer . 如果您更喜欢命令行并拥有最近的Python解释器,那么Azure Batch和HPC团队已经发布了一个代码示例,其中包含一些名为blobxfer的类似AzCopy的功能 。 This allows full recursive directory ingress into Azure Storage as well as full container copy back out to local storage.
这允许完全递归目录进入Azure存储以及完整容器复制回本地存储。 [full disclosure: I'm a contributor for this code]
[完全披露:我是此代码的撰稿人]
You can use the find
command with the exec
option to execute the command to upload each file, as described here as described here : 您可以使用
find
命令和exec
选项来执行命令上传的每个文件,这里描述如下描述 :
find *.csv -exec az storage blob upload --file {} --container-name \
CONTAINER_NAME --name {} --connection-string=‘CONNECTION_STRING’ \;
where CONNECTION_STRING is the connection string of your Azure Blob store container, available from portal.azure.com . 其中CONNECTION_STRING是Azure Blob存储容器的连接字符串,可从portal.azure.com获得 。 This will upload all CSV files in your directory to the Azure Blob store associated with the connection string.
这会将目录中的所有CSV文件上载到与连接字符串关联的Azure Blob存储。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.