Home

How to Create Buckets (mb) with the gsutil Utility

|
Updated:  
2018-06-19 1:17:59
|
From The Book:  
TensorFlow For Dummies
Explore Book
Buy On Amazon
Before you upload data to Cloud Storage, you need to create one or more buckets. The command to know is mb:
gsutil mb [-c class] [-l location] [-p project_id] url…
The –c, –l, and –p flags are particularly important:
  • -c: The bucket's storage class: multi_regional, regional, nearline, and coldline. (Default: multi_regional or regional).
  • -l: The bucket's multi-regional location or regional location. (Default: us).
  • -p: The project's ID. (Default: the ID in the gsutil configuration file).
For example, the following command creates a regional bucket named gs://dummies123-tfbook/example and associates it with the us-central1 region.
gsutil mb -c regional -l us-central1 gs://dummies123-tfbook/example

About This Article

This article is from the book: 

About the book author:

Matthew Scarpino has been a programmer and engineer for more than 20 years. He has worked extensively with machine learning applications, especially those involving financial analysis, cognitive modeling, and image recognition. Matthew is a Google Certified Data Engineer and blogs about TensorFlow at tfblog.com.