# 2026-06-10 - Using Openrsync Instead Of Rsync
I finally got around to replacing rsync with openrsync and i'm a
happy camper. So far i am using it on Slackware 15 and NetBSD 10.1.
I began with the latest commit [48070e6], and got coredumps. This is
a known issue [1]. I resolved it by using the earlier commit
[8f39166] instead.
I installed it like so:
$ ./configure PREFIX=/home/ben/local
$ make
$ make install
It didn't compile "out of the box" on NetBSD. The following local
change worked around this.
--- main.c.orig 2026-06-10 15:58:23.328395908 -0700
+++ main.c 2026-06-10 15:58:32.424453429 -0700
@@ -40,6 +40,7 @@
#include "extern.h"
#include "rules.h"
+#include <limits.h>
static struct opts opts;
typedef int (rsync_option_filter)(struct sess *, int, ...
I was lucky because i happened to only use rsync command-line
arguments that were also supported by openrsync. However, i ran into
one surprise: In contrast to rsync, openrsync requires the
destination to be a directory. I used the following kludge.
OLD: rsync /dir/file.db host:/dir/file.new
NEW: cp /dir/file.db /dir/file.new
NEW: openrsync /dir/file.new host:/dir/
NEW: rm /dir/file.new
Why would i do this? To sync a database to a different file on the
remote side, waiting to clobber the remote database until after the
synchronization has completed.
Comparing stripped executable sizes on NetBSD,
rsync 3.4.3 is 511464 bytes and openrsync is 135376 bytes.
I thought it was interesting that openrsync uses a single process
with an event loop. In contrast, rsync forks multiple processes.
Thank you OpenBSD for providing this alternative!
tags: bencollver,technical,unix
# Footnotes
HTML [1] Assertion failure since 48070e68d73f
# Tags
DIR bencollver
DIR technical
DIR unix