Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

File sync - Syncthing vs Unison - neither very good

519 views
Skip to first unread message

James Harris

unread,
Mar 17, 2021, 7:45:18 AM3/17/21
to
Just some notes for me to refer back to and for anyone who is interested.

I was planning to use either Syncthing or Unison to set up file
synchronisation between a server or two and an arbitrary number of
clients. Unfortunately, both apps have problems.

Unison apparently required the executable to be run each time a sync was
desired. I really wanted it to run in the background and maintain
synchronisation at all times while the machines could contact each
other. So I tried Syncthing first.

Syncthing has a very promising graphical configuration interface via a
web browser, making it ostensibly easy to set up. Unfortunately, I had
some issues with it.

First, the version provided by Ubuntu 18.04 (LTS) was, according to
forum posts, buggy and was certainly unable to play properly with that
in 20.04 (also LTS). As I need both versions of Ubuntu running for now
and neither version of Ubuntu had any matching version of Syncthing
available the lack of compatibility became a problem.

I found I could maintain the Syncthing versions in lockstep by using the
deb procedure at

https://syncthing.net/downloads/

Unfortunately, even though I installed the latest stable Syncthing
version on two machines it, too, was buggy. For example, although two
hosts were set to bidirectional transfers and reported that that's what
they were doing it required a restart of the process at one end to get
anything more than unidirectional sync happening.

I don't know if it would have been stable thereafter but I also found
that it did not synchronise user and group ownership - which is a
requirement for me - and looking through a Syncthing forum indicates
that non-synchronisation of users and groups has long been a feature
rather than a bug, perhaps to avoid root privileges, and is likely to stay.

Syncthing has some good points: it may be very good for synchronising
files even between Unix and Windows for a single user per running
instance, and it can work via a public relay server in order to avoid
incoming connections to a home router, but it does not work well for a
mix of files with different owners.

So I looked again at Unison. It apparently does synchronise file owners
and groups but before I tried it I read in

https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html

that server and client versions of Unison really should be in lockstep.
It says:

"It is important that the version of Unison installed on the server
machine is the same as the version of Unison on the client machine. But
some flexibility on the version of Unison at the client side can be
achieved by using the -addversionno option"

The lack of compatibility between versions of Unison could be a problem,
and the addversionno looks like it could become a maintenance headache.

So at the moment neither Syncthing nor Unison seems like a good
bidirectional sync solution to a simple problem. Is this where software
is at in the 21st century?


--
James Harris

James H. Markowitz

unread,
Mar 17, 2021, 11:04:40 AM3/17/21
to
On Wed, 17 Mar 2021 11:45:13 +0000, James Harris wrote:

> Just some notes for me to refer back to and for anyone who is
> interested.
>
> I was planning to use either Syncthing or Unison to set up file
> synchronisation between a server or two and an arbitrary number of
> clients. Unfortunately, both apps have problems.

I can only tell you about my experience with Syncthing - I have
never used Unison.

Syncthing has worked flawlessly for me all along, between Android
an Linux systems. The synchronization is bidirectional and fast. Although
I tend to keep them all at the same version, I have occasionally run
different versions in different hosts, without any problems.

Carlos E.R.

unread,
Mar 17, 2021, 4:20:12 PM3/17/21
to
On 17/03/2021 12.45, James Harris wrote:

...

>
> So I looked again at Unison. It apparently does synchronise file owners
> and groups but before I tried it I read in
>
> https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html
>
>
> that server and client versions of Unison really should be in lockstep.
> It says:
>
> "It is important that the version of Unison installed on the server
> machine is the same as the version of Unison on the client machine. But
> some flexibility on the version of Unison at the client side can be
> achieved by using the -addversionno option"
>
> The lack of compatibility between versions of Unison could be a problem,
> and the addversionno looks like it could become a maintenance headache.

Unison is intended to do two way syncing between two computers, say a
laptop and a desktop machine. Not to a server.

It is a GUI, but I have a recollection of having seen a CLI somewhere.

--
Cheers, Carlos.

Andrei Z.

unread,
Mar 18, 2021, 12:28:05 AM3/18/21
to
Mint 20.1

:~$ apt search unison
p unison - file-synchronization tool for Unix and Windows

p unison-all - file synchronization tool (all console versions)

p unison-all-gtk - file synchronization tool (all GTK+ versions)

p unison-gtk - file-synchronization tool for Unix and Windows
with GTK+ interface

:~$ apt show unison-all
...
Depends: unison (>= 2.48)
...
Description: file synchronization tool (all console versions)
This is a metapackage that depends on all supported console versions of
Unison, a file synchronization tool.

Carlos E.R.

unread,
Mar 18, 2021, 7:16:09 AM3/18/21
to
cer@Telcontar:~> zypper search --details unison
...
Loading repository data...
Reading installed packages...

S | Name | Type | Version | Arch | Repository
---+--------------------+---------+------------------+--------+-------------------------
i+ | unison | package | 2.48.4-lp152.3.8 | x86_64 | Main
Repository (OSS)
| unison-debuginfo | package | 2.48.4-lp152.3.8 | x86_64 |
openSUSE-Leap-15.2-Debug
| unison-debugsource | package | 2.48.4-lp152.3.8 | x86_64 |
openSUSE-Leap-15.2-Debug
cer@Telcontar:~>


cer@Telcontar:~> zypper info unison

Information for package unison:
-------------------------------
Repository : Main Repository (OSS)
Name : unison
Version : 2.48.4-lp152.3.8
Arch : x86_64
Vendor : openSUSE
Installed Size : 7,7 MiB
Installed : Yes
Status : up-to-date
Source package : unison-2.48.4-lp152.3.8.src
Summary : File synchronization tool
Description :
Unison is a file synchronization tool for Unix and Windows. It allows
two replicas of a collection of files and directories to be stored on
different hosts (or different disks on the same host), modified
separately, then brought up to date by propagating the changes in each
replica to the other.

cer@Telcontar:~>


The cli version is missing here:

er@Telcontar:~> rpm -ql unison
/usr/bin/unison
/usr/bin/unison-fsmonitor
/usr/share/applications/unison.desktop
/usr/share/doc/packages/unison
/usr/share/doc/packages/unison/BUGS.txt
/usr/share/doc/packages/unison/CONTRIB
/usr/share/doc/packages/unison/COPYING
/usr/share/doc/packages/unison/NEWS
/usr/share/doc/packages/unison/README
/usr/share/doc/packages/unison/ROADMAP.txt
/usr/share/doc/packages/unison/unison-manual.html
/usr/share/pixmaps/unison.png
cer@Telcontar:~>




--
Cheers, Carlos.

dillinger

unread,
Mar 18, 2021, 2:16:05 PM3/18/21
to
It claims: Transfers of small updates to large files are optimized using
a compression protocol similar to rsync.
To make that work it very likely has to run on both sides.
> It is a GUI, but I have a recollection of having seen a CLI somewhere.
>
You can build it as both, or either.

Carlos E.R.

unread,
Mar 18, 2021, 3:28:10 PM3/18/21
to
Yes, or the requirement to have the same version installed at the remote
machine would be pointless. But you don't start it directly, it is done
via an ssh session started and controlled by unison.


>> It is a GUI, but I have a recollection of having seen a CLI somewhere.
>>
> You can build it as both, or either.

Must be that.

--
Cheers, Carlos.

Computer Nerd Kev

unread,
Mar 18, 2021, 6:35:48 PM3/18/21
to
James Harris <james.h...@gmail.com> wrote:
> Just some notes for me to refer back to and for anyone who is interested.
>
> I was planning to use either Syncthing or Unison to set up file
> synchronisation between a server or two and an arbitrary number of
> clients. Unfortunately, both apps have problems.
>
> Unison apparently required the executable to be run each time a sync was
> desired. I really wanted it to run in the background and maintain
> synchronisation at all times while the machines could contact each
> other. So I tried Syncthing first.

Without having used either, I'm really not sure how any such
program would not simply run every so often and check what needs
syncing. So I doubt that Syncthing would do anything smarter than
if Unison were simply called at a certain interval.

For immediate syncing, it seems to me that only code running at the
kernel lever can achieve this, because the kernel is all that a
program modifying a file will be talking to. So you need either a
special file system driver:
https://en.wikipedia.org/wiki/List_of_file_systems#Distributed_file_systems

Or device driver:
https://linbit.com/drbd/

That can synchronise multiple storage locations over a network
immediately when data is being modified. If not using something
like that, then I'm not sure why simply calling Rsync at a short
interval isn't an option, because it seems equivalent to any other
option outside of the kernel level to me.

--
__ __
#_ < |\| |< _#

Anssi Saari

unread,
Mar 19, 2021, 2:46:31 AM3/19/21
to
n...@telling.you.invalid (Computer Nerd Kev) writes:

> Without having used either, I'm really not sure how any such
> program would not simply run every so often and check what needs
> syncing. So I doubt that Syncthing would do anything smarter than
> if Unison were simply called at a certain interval.

See inotify.
0 new messages