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