Discussion:
[unison-users] novice asking for help
Benjamin Márkus markus.benjamin@gmail.com [unison-users]
2018-01-05 12:26:37 UTC
Permalink
Hi,

I have just installed Unison to a fairly old MacMini running OS X 10.6.8.

My aim is to keep a regularly (ideally every few hours) updated copy of the
contents of an smb network location on an attached hard drive. I have
downloaded a GUI version of Unison and managed to connect the two locations
in a Unison profile fine, and manual scans and sync cycles are running fine.

My problem is tho that I'd like it to run by itself at regular intervals,
with a very general rule of always overwriting the local storage with
changes propagating from the smb location (and never in the other
direction). A preferable addition would be if Unison let me know if the
update from the server would include deletion of large amounts of data on
the local storage and ask explicit manual permission in those cases.

Any ideas how to configure Unison to do this? I tried to do my reading in
the manual but to no avail.

Thanks in advance,
Benjamin Markus
Alan Schmitt alan.schmitt@polytechnique.org [unison-users]
2018-01-05 13:35:39 UTC
Permalink
Post by Benjamin Márkus ***@gmail.com [unison-users]
My problem is tho that I'd like it to run by itself at regular intervals,
with a very general rule of always overwriting the local storage with
changes propagating from the smb location (and never in the other
direction). A preferable addition would be if Unison let me know if the
update from the server would include deletion of large amounts of data on
the local storage and ask explicit manual permission in those cases.
Any ideas how to configure Unison to do this? I tried to do my reading in
the manual but to no avail.
There are two way to set up unidirectional synchronization. One is to
force one root to be always right, which is written

force = path_of_root
batch = true

(the batch part means that unison will not ask question)

However, if files only change on one root, my preferred approach is this
one:

noupdate = path_of_root
nocreation = path_of_root
batch = true

this way I can detect if some files have changed on the target
destination, which indicates something is wrong. (At that point I run a
manual sync to see what happened and set things right.)

Regarding deletion, there is a confirmbigdel option (that defaults to
true) that requires confirmation if the whole repo or any top-level path
(if you use "path" directives) are deleted. It aborts the
synchronization if batch is set to true.

Hope this helps,

Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-11: 405.14, 2016-11: 403.53
Nick Demou ndemou@enlogic.gr [unison-users]
2018-01-05 13:34:24 UTC
Permalink
From the manual:
-----------------
when Unison is run with the -batch flag, the interface will now
automatically propagate changes and terminate, without waiting for user
interaction.
[...]
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.
-----------------
Maybe rsync is a better option for such simple job (one-way sync). In
that case rsync --dry-run will give you a preview of what it's about to
happen if you run it.

Nick
Post by Benjamin Márkus ***@gmail.com [unison-users]
Hi,
I have just installed Unison to a fairly old MacMini running OS X 10.6.8.
My aim is to keep a regularly (ideally every few hours) updated copy
of the contents of an smb network location on an attached hard drive.
I have downloaded a GUI version of Unison and managed to connect the
two locations in a Unison profile fine, and manual scans and sync
cycles are running fine.
My problem is tho that I'd like it to run by itself at regular
intervals, with a very general rule of always overwriting the local
storage with changes propagating from the smb location (and never in
the other direction). A preferable addition would be if Unison let me
know if the update from the server would include deletion of large
amounts of data on the local storage and ask explicit manual
permission in those cases.
Any ideas how to configure Unison to do this? I tried to do my reading
in the manual but to no avail.
Thanks in advance,
Benjamin Markus
--
Νίκος ΔήΌου / Nick Demou, enLogic
t: (+30)2113110311 fax: 2107752869
Ελ.ΒεΜιζέλου 214 & ΜπουΌπουλίΜας, ΚαλλιΞέα
Loading...