Question

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)?

Was it helpful?

Solution

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.

OTHER TIPS

The official tool now has RSYNC as of May, 2014 details can be found here:

http://googlecloudplatform.blogspot.com/2014/05/a-new-and-improved-gsutil-now-with-rsync.html

gsutil rsync : The rsync command automates the synchronization of a local file system directory with the contents of a Google Cloud Storage bucket, or across cloud storage buckets or providers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top