Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Clous Storage - is there a gsutil 'rsync' equivalent in the Java API?

gsutil has a really neat feature called 'rsync' that synchronises 2 buckets/directories in GCS. I've searched the JSON API and the Java Client library but I can't see anything that supports this type of functionality out-of-the-box.

Does anyone know how to achieve the same functionality of 'rsync' via the Java Client (without actually writing the diff logic between the 2 buckets)?

like image 525
Graham Polley Avatar asked Mar 18 '23 21:03

Graham Polley


1 Answers

There is not. gsutil's rsync functionality is implemented using the JSON API, but the JSON API itself does not have any inherent support for syncing between buckets or directories. You could certainly implement syncing in the same manner, or you could call out to gsutil itself, but those are pretty much your main two choices.

like image 165
Brandon Yarbrough Avatar answered Apr 06 '23 02:04

Brandon Yarbrough