Today, after a long period of weakness due to post-COVID, I started with some scripting again.

I wanted to synchronise a local directory ~/Documents and a remote directory nas01.cvdg.eu:~/Documents.

Off course I could use the classic rsync and I tried this at first, but this solution works in one direction. I am looking for a solution which synchronise the directories in but ways. After searching the internet, I found unison.

$ unison ~/Documents ssh://nas01.cvdg.eu//home/cees/Documents -batch
Unison 2.53.7 (ocaml 5.3.0): Contacting server...
Connected [//laptop01//home/cees/Documents -> //nas01.cvdg.eu//home/cees/Documents]

Looking for changes
  Waiting for changes from server
Reconciling changes
Nothing to do: replicas have not changed since last sync.