App Engine Blobstore 一次下载所有 Blob

发布于 2024-12-28 12:00:55 字数 67 浏览 5 评论 0原文

我想将所有 blob 作为单个压缩文件(或其他方式)下载到我的计算机上。无论如何要这样做吗?我使用Python SDK。

I would like to download all blobs as a single zipped file (or another way) to my computer. Anyway to do that? I use the python SDK.

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

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

发布评论

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

评论(4

不必了 2025-01-04 12:00:55

不,没有办法做到这一点。 Blobstore 可以任意大,远大于单个文件中实际下载的大小。

No, there's no way to do this. The blobstore can be aribrarily large, far larger than is practical to download in a single file.

恬淡成诗 2025-01-04 12:00:55

每个发送的网络请求的请求截止时间为 60 秒到GAE。 一个请求的响应不能超过 32 兆,其处理程序通常也不能使用使用默认配额超过 128 兆内存。

因此,假设,如果您有一个非常小的应用程序,也许您可以在内存中组装所有 blob 的 zip。但这是不可扩展的,如果你的 blostore 这么小,值得吗? (不,不是)。

底线是,GAE 中几乎没有什么是一次性完成的。您可以根据多个请求迭代地执行操作。

There is a request deadline of 60 seconds for each web request sent to GAE. One request cannot have a response larger than 32 megs, nor can its handler generally use more than 128 megs of memory using the default quotas.

So hypothetically, if you have a very small application, maybe you could assemble a zip in-memory of all your blobs. But that's not going to be scalable, and if your blostore is so small anyway, is it worth it? (No, it isn't).

Bottom line is, very little in GAE is done all-at-once. You do things iteratively, over multiple requests.

时光磨忆 2025-01-04 12:00:55

无论如何,一次下载一个可能会更好。这样,如果您的工作中途终止,您可以从失败的地方重新启动,而不是从头开始。

It's probably better to download them one at a time anyway. That way if your job dies part way through you can restart for where it failed rather than starting over again from scratch.

°如果伤别离去 2025-01-04 12:00:55

如何将 blob 复制到 Google 存储,然后使用 gsutil 从那里下载 blob?

How about copy the blobs to google storage and then use gsutil to download the blobs from there?

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