获取Google存储桶大小的最快方法? [英] Fastest way to get Google Storage bucket size?

查看:73
本文介绍了获取Google存储桶大小的最快方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在执行此操作,但是由于存储桶中有几个TB的数据,所以速度非常慢:

I'm currently doing this, but it's VERY slow since I have several terabytes of data in the bucket:

gsutil du -sh gs://my-bucket-1/

与子文件夹相同:

gsutil du -sh gs://my-bucket-1/folder

是否有可能以其他方式或更快的方式获得完整存储桶(或子文件夹)的总大小?

Is it possible to somehow obtain the total size of a complete bucket (or a sub-folder) elsewhere or in some other fashion which is much faster?

推荐答案

不幸的是,没有.如果您需要了解当前存储桶的大小,没有比您正在做的更快的方法了.

Unfortunately, no. If you need to know what size the bucket is right now, there's no faster way than what you're doing.

如果需要定期检查,可以启用存储桶日志记录. Google云端存储会生成每日存储日志,可用于检查存储桶的大小.如果有帮助的话,您可以在这里了解更多信息: https://cloud.google.com/storage/docs/accesslogs#delivery

If you need to check on this regularly, you can enable bucket logging. Google Cloud Storage will generate a daily storage log that you can use to check the size of the bucket. If that would be useful, you can read more about it here: https://cloud.google.com/storage/docs/accesslogs#delivery

这篇关于获取Google存储桶大小的最快方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆