Uses old Rust 2015

0.1.0 Oct 30, 2019
0.0.0 Oct 28, 2019

#25 in #rsync

BSD-3-Clause

55KB
1.5K SLoC

Build Status Say Thanks!

What is this?

This is an rsync clone written in the Rust programming language. It is intended to provide the functionality of rsync, rdiff, and zsync in one single program, as well as some additions such as caching file signatures to make repeated synchronizations faster. It will also provide a library, allowing to use the functionality in your own programs.

Generated documentation

Current status

Core functionality is there. You can index and sync local folders.

The next step is implementing SSH and HTTP remotes.

How to use

Common options: -X indicates the location of the index file on the source side, and -x the index file on the destination side.

rsync

$ rrsync sync some/folder othermachine:folder

Pre-computed indices are optional but make the operation faster:

$ rrsync index -x folder.idx some/folder
$ ssh othermachine \
  rrsync index -x folder.idx folder
$ rrsync sync -X folder.idx -x othermachine:folder.idx some/folder othermachine:folder

rdiff

# Same as rdiff (signature/delta/patch)
$ rrsync index -x signature.idx old/folder
$ rrsync diff -o patch.bin -x signature.idx new/folder
$ rrsync patch old/folder patch.bin

zsync

$ rrsync index -x data.tar.rrsync.idx data.tar
$ rrsync sync -X data.tar.rrsync.idx old/data.tar
# Or over network
$ rrsync sync -X http://example.org/data.tar.rrsync.idx old/data.tar

Notes

The rsync algorithm: https://rsync.samba.org/tech_report/ How rsync works: https://rsync.samba.org/how-rsync-works.html

zsync: http://zsync.moria.org.uk/

Compression crate: https://crates.io/crates/flate2

Dependencies

~31MB
~488K SLoC