How to Transfer data from Google cloud storage to S3 without any manual activity?

杀马特。学长 韩版系。学妹 提交于 2020-04-15 06:52:53

问题


I want to transfer data from my cloud storage bucket to S3. I did a lot of research . I found an interesting article in which this can be done using gsutil command. Again it requires a manual activity. Is there any way to do this without any manual activity or like any possibility to run this gsutil command through Java API ?

I have created a VM instance on my Google cloud project.I have configured the boto file which has my AWS credentials.Using gsutil command I was able to copy my data from cloud storage to s3.I want to automate this step


回答1:


gsutil can work with both Google Storage and S3.

gsutil rsync -d -r gs://my-gs-bucket s3://my-s3-bucket

You just need to configure it with both - Google and your AWS S3 credentials. gsutil would use credentials from ~/.boto file.

There are multiple ways to automate shell command execution. From Java's Runtime.exec() to Google Cloud Scheduler (your cloud's cron)




回答2:


Fully automated and easy to use way would be Google Storage Transfer. It would let you select the source and target buckets in either S3 or GCS and set shedule such as "run daily at 1am"



来源:https://stackoverflow.com/questions/56882228/how-to-transfer-data-from-google-cloud-storage-to-s3-without-any-manual-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!