简体   繁体   English

上传到云存储 - 我是否遗漏了一些明显的东西?

[英]Uploading to Cloud Storage - am I missing something obvious?

I'm trying to find a fast way to upload big folders to Google cloud storage.我正在尝试找到一种将大文件夹上传到 Google 云存储的快速方法。 When I do it via the web browser, it often can't handle the size.当我通过网络浏览器执行此操作时,它通常无法处理大小。

So I've been trying to use SDK Shell.所以我一直在尝试使用 SDK Shell。

I write我写的

gsutil cp C:\Folder\Sub folder - name  gs://bucketname/

I get No urls matched C:\\Folder我得到No urls matched C:\\Folder

Then I put the file name in quotes然后我将文件名放在引号中

gsutil cp C:\"Folder\Sub folder - name"  gs://bucketname/

I get told unrecognised scheme name gs我被告知unrecognised scheme name gs

I've had a couple of friends look at it, they have no idea.我有几个朋友看过,他们不知道。 I feel like I've tried so many iterations.我觉得我已经尝试了很多次迭代。 Obviously I've missed something super basic?显然我错过了一些超级基本的东西? Any thoughts?有什么想法吗? It's a virtual machine running windows.这是一个运行windows的虚拟机。

Thanks!谢谢!

You have to use -r flag你必须使用-r标志

The -R and -r options are synonymous. -R 和 -r 选项是同义词。 Causes directories, buckets, and bucket subdirectories to be copied recursively.导致递归复制目录、存储桶和存储桶子目录。 If you neglect to use this option for an upload, gsutil will copy any files it finds and skip any directories.如果您忽略使用此选项进行上传,gsutil 将复制它找到的所有文件并跳过任何目录。 Similarly, neglecting to specify this option for a download will cause gsutil to copy any objects at the current bucket directory level, and skip any subdirectories.同样,忽略为下载指定此选项将导致 gsutil 复制当前存储区目录级别的任何对象,并跳过任何子目录。

gsutil cp -r  C:\Folder\sub-folder-name  gs://bucketname/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM