14
votes

What is the best way to move an existing Google Cloud Storage bucket to another project?

I don't want to copy it outside Google Cloud Storage for the transfer, have two copies of the data or use another bucket name.

How close can I get to these requirements?

5

5 Answers

8
votes

It's now possible directly from the console UI. Simply head on over to the transfer page

or follow the instructions here.

8
votes

Moving a bucket from one project to another is not currently possible. The easiest way to copy the data would be to spin up a GCE VM and use gsutil -m. This will at least save the bandwidth cost of moving the data.

Update: there is now a Moving and renaming buckets documentation page.

4
votes

Another way from the CLI:

Just mentioned the source and target bucket name that may belong to two different or same project:

gsutil mv gs://src_bucket_name gs://dst_bucket_name

I was able to do it easily which google SDK install in local cli.

Note — login user should have proper access to perform the action.

Reference: https://cloud.google.com/storage/docs/gsutil/commands/mv

3
votes

I wrote a CLI tool that can be used to move buckets from one project to another or rename a bucket in the same project.

Permissions need to be set up correctly to allow the Storage Transfer Service service account from the source project to be able to access/delete buckets in the source project and create buckets in the target project.

https://github.com/GoogleCloudPlatform/professional-services/tree/master/tools/gcs-bucket-mover

2
votes

It is reasonably not possible to move the Google Cloud Storage bucket within one project to another project. However, you can copy the data within one bucket to another bucket.