Sync Command¶
Basic command-line of sync looks like [1]:
$ ciruela sync --append=local-dir:/remote/dir cluster.example.org
This means:
- Connect to cluster
cluster.example.org
- Upload a local directory
local-dir
to a virtual remote directory/remote/dir
on whole cluster (whatever machines accept this dir)
Multiple directories can be added simultaneously as well as multiple clusters.
There are couple of upload modes:
--append
– add directory if not exists, fails if the directory exists and its hash doesn’t match currently uploaded one--append-weak
– add directory if not exists, but ignore if it exists--replace
– replace a directory on the remote system(s), this only works if directory configured with append-only offalse
Each cluster specified is processed by the same algorithm, which is basically:
- Find three nodes
- Subscribe for notifications
- Start upload
- Wait for all notifications to complete
More details in How Sync Works. All of them are processed at the same time.
If you don’t have a common hostname for your cluster you may use -m
instead:
$ ciruela sync --append=local-dir:/remote/dir \
-m s1.example.org s2.example.org s3.example.org
This works the same but tedious to write and hard to maintain.
See ciruela --help
for more options.
[1] | You also need keys for upload. See Client Keys |