Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



mb - Make buckets

mb - Make buckets

Synopsis

gsutil mb [-c class] [-l location] [-p proj_id] uri...

Description

The mb command creates a new bucket. Google Cloud Storage has a single namespace, so you will not be allowed to create a bucket with a name already in use by another user. You can, however, carve out parts of the bucket name space corresponding to your company’s domain name (see “gsutil help naming”).

If you don’t specify a project ID using the -p option, the bucket will be created using the default project ID specified in your gsutil configuration file (see gsutil help config ). For more details about projects see gsutil help projects .

The -c and -l options specify the storage class and location, respectively, for the bucket. Once a bucket is created in a given location and with a given storage class, it cannot be moved to a different location, and the storage class cannot be changed. Instead, you would need to create a new bucket and move the data over and then delete the original bucket.

Bucket Storage Classes

If you don’t specify a -c option, the bucket will be created with the default (standard) storage class.

If you specify -c DURABLE_REDUCED_AVAILABILITY (or -c DRA), it causes the data stored in the bucket to use durable reduced availability storage. Buckets created with this storage class have lower availability than standard storage class buckets, but durability equal to that of buckets created with standard storage class. This option allows users to reduce costs for data for which lower availability is acceptable. Durable Reduced Availability storage would not be appropriate for “hot” objects (i.e., objects being accessed frequently) or for interactive workloads; however, it might be appropriate for other types of applications. See the online documentation for pricing and SLA details.

Bucket Locations

If you don’t specify a -l option, the bucket will be created in the default location (US). Otherwise, you can specify one of the available locations:

  • ASIA (Asia)
  • ASIA-EAST1 (Eastern Asia-Pacific)
  • EU (European Union)
  • US (United States)
  • US-EAST1 (Eastern United States) [1]
  • US-EAST2 (Eastern United States) [1]
  • US-EAST3 (Eastern United States) [1]
  • US-CENTRAL1 (Central United States) [1]
  • US-CENTRAL2 (Central United States) [1]
  • US-WEST1 (Western United States) [1]
[1] ( 1 , 2 , 3 , 4 , 5 , 6 ) These locations are for Regional Buckets . Regional Buckets is an experimental feature and data stored in these locations is not subject to the usual SLA. See the documentation for additional information.

Note that creating a regional bucket can only be done using the DURABLE_REDUCED_AVAILABILITY storage class - for example:

gsutil mb -c DRA -l US-CENTRAL1 gs://some-bucket

Options

-c class Can be DRA (or DURABLE_REDUCED_AVAILABILITY) or S (or STANDARD). Default is STANDARD.
-l location Can be any of the locations described above. Default is US. Locations are case insensitive.
-p proj_id Specifies the project ID under which to create the bucket.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.