Use unison -force
:
Manual:
Including the preference
-force root
causes Unison to resolve all differences (even non-conflicting
changes) in favor of root. This
effectively changes Unison from a
synchronizer into a mirroring utility.
You can also specify -force newer
(or
-force older
) to force Unison to choose the file with the later
(earlier) modtime. In this case, the
-times
preference must also be enabled. This preference is overridden
by the forcepartial
preference. This
preference should be used only if you
are sure you know what you are doing!
E.g. (using socket mode). Start up unison listener in the directory that you want to be a mirror of something else. Target that socket in the unison client call. Force causes changes to be all ONE WAY from the given root.
cd /target/mirror/directory
unison -socket 123456 &
Elsewhere or on the same host:
unison -silent -force /home/test/thing2 /home/test/thing2 socket://somehost:123456/
1Syntax for the profile file is to specify the path to the root directory for the force variable. I.e.,
force = /home/me/mysynchdir
– Daniel – 2018-01-16T16:56:07.167