Graham Polley
Graham Polley

Reputation: 14781

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

Upvotes: 4

Views: 1863

Answers (2)

Kerwin Co
Kerwin Co

Reputation: 19

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.

Upvotes: 1

Brandon Yarbrough
Brandon Yarbrough

Reputation: 38379

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.

Upvotes: 5

Related Questions