Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I move data directly from one Google Cloud Storage project to another?

How can I move data directly from one Google Cloud Storage project to another? I understand how to upload and how to download, but I want to transfer directly between projects.

like image 638
HannahS Avatar asked Jun 25 '15 11:06

HannahS


People also ask

How do I transfer files from one GCP instance to another?

Upload that key file from your personal machine using gcloud compute copy-files and your personal account to the local instance(i.e. the machine you're SSHing into and running the gcloud compute copy-files command on.) Then run this from the local instance via SSH.


2 Answers

Open The Web console Storage > Tranfer to create a new transfer.

Select the source bucket you want to copy from. Just like cratervale menitoned just above here, bucket identifiers are globally unique (this is key to the solution). So once you get to the destination part of the transfer form, you can write/paste the target bucket right in it's text input. Even if that bucket is from another project. It will show you a green icon once the target has been verified being an existing bucket. You can continue the form again to finalise your setup.

Once you started the transfer from the form, you can follow it's progress by hitting the refresh button on top of the console.

like image 30
Martin van Dam Avatar answered Sep 28 '22 04:09

Martin van Dam


To copy any single object from one GCS location to another, you can use the copy command. This can be done from either of our public APIs, or by using the command-line client, gsutil.

With gsutil, the cp command could be used like this:

gsutil cp gs://bucket1/obj gs://bucket2/obj2 

Edit:
Since I wrote this, the Google Cloud Transfer Service has become available, which is good for copying whole buckets between GCS projects, or for copying whole buckets from S3 into GCS. You can find out more here.

like image 78
Brandon Yarbrough Avatar answered Sep 28 '22 03:09

Brandon Yarbrough