OpenRsync Work Continues

OpenBSD developers are writing a permissively-licensed implementation of the rsync program.

OpenRsync is a file transfer program using the rsync protocol from Samba’s rsync utility. It was primarily written by Kristaps Dzonsons.

We are still working on it… so please wait.

The OpenBSD project has a Do-It-Yourself habit: it writes their own version of popular utilities. For years, the Apache2, then nginx was included in the base installation until the project wrote its own HTTP server: httpd. The same may happen with Game of Trees, an OpenBSD developer’s implementation of git. The DIY motivation varies from program to program. got provides is a different user interface to interact with git repositories with fewer, new subcommands. The same reimagining of the interface is not occurring with openrsync. For compatibility with non-OpenBSD rsync servers, openrsync supports GNU-style longer command-line flags such as --archive instead of just -a. So why does OpenRsync exist?

OpenRsync is written under the OpenBSD project’s preferred ISC-style license. Its original purpose is for use by rpki-client. And it seems to only ever be intended for use as a rsync client. There is no rsync protocol daemon which are often used in mirror sites such as rsync://ftp.nluug.nl/openbsd/. What we seem to have is a rewrite of a subset of the rsync client program. For inclusion into the base installation, a small rewrite is easier to maintain than importing the entirety of Samba’s rsync. For a rough indication of this effort, sloccount shows that Samba’s rsync is almost 8 times larger than OpenRsync (43000 versus 5500 source lines of code).

Whilst OpenRsync is a work in progress, it is possible to use it today. The openrsync program has not been renamed to rsync , so connecting to a server requires the use of the --rsync-path flag. For example, the files making up this website are uploaded from any computer to an OpenBSD server using hugo and rsync as follows:

rsync -av --rsync-path /usr/bin/openrsync public/ ams.olowe.co:/var/www/htdocs/www.srcbeat.com/

As always, for more information see the openrsync(1) manual page.