DinEsh
DinEsh

Reputation: 113

how to create a bucket in gsutil for uploading sql dump file in cloudsql.?

I am using windows-7 64-bit OS. I am trying to upload my sql dump file to Cloud SQL. It requires gsutil tool to create the bucket and upload it. but how do I create the bucket using gsutil?. Thanks in advance.

Upvotes: 3

Views: 307

Answers (3)

Sneha Mule
Sneha Mule

Reputation: 715

Storage Bucket Can create using UI.

Go to Storage Bucket -> Click On Create Button.Then provide name and click on Create button.

It will create Bucket

Using Gsutil Command

  gsutil mb gs://BUCKET_NAME

Set the following optional flags to have greater control over the creation of your bucket:

 gsutil mb -p PROJECT_ID -c STORAGE_CLASS -l BUCKET_LOCATION -b on gs://BUCKET_NAME

Reference : https://cloud.google.com/storage/docs/creating-buckets#storage-create-bucket-gsutil

Upvotes: 0

Mars
Mars

Reputation: 1422

You can also use Storage Browser in Google Developer Console to do that. Assuming you're using App Engine, a default bucket should have been created for your app automatically: https://developers.google.com/appengine/docs/php/googlestorage/setup

Upvotes: 0

Ryan
Ryan

Reputation: 2542

More info about GSTIL can be found here: https://developers.google.com/storage/docs/gsutil

gsutil mb gs://-INSERT BUCKET NAME HERE-

Note:

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”).

Which means the bucket must have a unique name across all buckets created in Google.

Upvotes: 3

Related Questions