Reputation: 2587
I'm using firebase storage to store profile pictures. I've created two projects: MyApp and MyApp-Dev. I can easily download the json data from the MyApp database and upload it to MyApp-Dev database. Is there a way to do something similar to transfer the images from one project to another? Without the user's profile pictures it makes testing MyApp-Dev quite difficult.
Upvotes: 11
Views: 2849
Reputation: 311
I did copy bucket A to be stored in the root of bucket B,
gsutil -m cp -r gs://<bucket-a>/* gs://<bucket-B>
Upvotes: 15
Reputation: 313
If you have the Google Cloud SDK installed you can use the gsutil command.
And you could move the information between buckets. Example:
gsutil -m cp -r gs://<bucket-myapp-name> gs://<bucket-myapp-dev-name>
-m to run in parallel. This can significantly improve performance if you are performing operations on a large number of files over a reasonably fast network connection
cp copy
-r recursive
Upvotes: 15