Is there a quick way to retrieve all the sizes of each of my Google Cloud Storage bucket?
We do not see the size in the UI. I have to do:
gsutil du -s -h gs://xxxx
for each bucket.
Is there a quick way to retrieve all the sizes of each of my Google Cloud Storage bucket?
We do not see the size in the UI. I have to do:
gsutil du -s -h gs://xxxx
for each bucket.
GCS does not provide this as a feature. What you're doing is likely the fastest way.
You could write a program to dynamically track the size of a bucket by watching change notifications, or you could use Cloud Storage's daily storage logs to get regular reports on it, but there's no instant way to see the current size.
I had a similar issue and found you can run the following command to find the size of all the buckets within your project. Just replace project-id with your own.
gsutil -o GSUtil:default_project_id=project-id du -shc