Fastest way to get Google Storage bucket size?

前端 未结 4 1420
隐瞒了意图╮
隐瞒了意图╮ 2020-12-24 00:51

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/

And th

4条回答
  •  再見小時候
    2020-12-24 01:44

    The visibility for google storage here is pretty shitty

    The fastest way is actually to pull the stackdriver metrics and look at the total size in bytes:

    Unfortunately there is practically no filtering you can do in stackdriver. You can't wildcard the bucket name and the almost useless bucket resource labels are NOT aggregate-able in stack driver metrics

    Also this is bucket level only- not prefixes

    The SD metrics are updated daily so unless you can wait a day you cant use this to get the current size right now

提交回复
热议问题