On Sat, 2009-05-02 at 17:33 -0400, Simon wrote:
> hi there!
>   I've been using unison to synchronise and backup my computers.
> unison is based on rsync IIRC but with the difference that it
> 'remembers' the state of the folder that was synchronised.  This way,
> if I delete a file on A, when sync'ing it will be deleted on B.  While
> rsync would leave the file on B...
> 
>   I see rsync as a very good 'cp' program, but I need something that
> can deal with conflicts (file changed on both hosts/directories) and
> can propagate changes like deletes properly.  Is there a way to get
> this behavior with rsync (maybe i missed something)?

No. Unison implements the rsync protocol for transferring files, but it
does not actually use rsync itself. You can make rsync transfer files
that are not in either the destination or a "reference" location with
the --compare-dest option, for example if doing an incremental backup,
but this will not propagate the deletion of a file or directory. The
delete file will come back on the next synchronization.

>   The reason i'm asking is that unison has been having problems
> recently in sync'ing two pc...  On my laptop, when i start the sync,
> it first checks it for changes against the 'unison snapshot'.  Changes
> done since last sync are those that will be propagated.  But it takes
> so long to check for changes (disk input rate is too slow i think)
> that once it finished, when it's time to send the changes to the
> remote server, the remote end has already disconnected!
> 
> Thanks for the help/suggestions!

If you are using ssh with unison, are you using the "KeepAlive yes"
option in your ssh configuration? If not, add it, and your connection
should not close from inactivity. If you are using direct sockets,
unison will use a keepalive so it can timeout if the communication link
is broken.

How long is unison taking to check for changes? I can usually reconcile
changes in my home directory (approximately 45G, 125,000 files) in less
than 10-15 seconds between my slow laptop drive and a remote machine.
However, if you are syncing with a Windows machine, expect the sync to
be much slower. Fast checking is not safe on Windows, as unison can miss
changes, so it scans every file every time unless you tell it otherwise.

Regards,

Brandon Vargo


Reply via email to