We want to synchronize a directory, called docs
between two hosts, called server
and laptop
, using unison
. So we have a unison
profile docs.prf
that defines the roots and gives a list of preferred rules for the synchronization. The command unison
is always run on laptop
. The problem is that sometimes the synchronization is done through a local network, in this case server
has an IP like 10.xxx.xxx.xxx
and server is identified as server.localdomain
, but sometimes it is done over internet, and the IP of server
is something like 135.xxx.xxx.xxx
and server
is known as server.domain.com
.
Of course we want to use the same data ar...
in both cases and the same rules defined in docs.prf
, so creating a second profile is not a solution.
I tried to use unison
command-line options, to change the remote host name (like -rootalias
, -host
) , but nothing succeeded. Does anyone have any idea ?