Reputation: 1
Newbie here, I apologize for my ignorance.
I have 2 buckets on google cloud platform. Each bucket has folders with objects in those folders.
/bucket2/cloud-backup-archive/4-media set/object
/bucket/cloud-backup/4-media set/object
I want to move all the objects from the bucket2 named directories to the bucket named directories.
I have tried using transfer on the console and that doesn't work as it doesn't allow me to drill down to the directories. It seems to only allow the contents of a bucket to be transffered.
Thank you for the help.
Kevin
Upvotes: 0
Views: 1062
Reputation: 2319
One of the possible ways to move the specific objects from one bucket to another is to use gsutil
.
To move all objects from specific subdirectory in bucket2
to specific subdirectory in bucket
, use the following command:
gsutil mv "gs://bucket2/cloud-backup-archive/4-media set/*" "gs:bucket/cloud-backup/4-media set/"
Note if you have a large amount of objects you might want to use gsutil -m mv
option to perform a multi-threaded/multi-processing move.
Upvotes: 1