On Sun, 2009-05-03 at 10:32 -0400, Simon wrote:
> > 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.
> 
> Ok i had to try a few times and now with tcpkeepalive being turned on
> it doesnt disconnect.  But when the scan is done, it 'reconciles' the
> changes (so it has received the changes from the remote end) and
> Begins the transfer of a dozen files, but not a bit is transfered.
> The sshd and unison process on the remote host are waiting/sleeping or
> in coma, but nothing happens.
> 
> I just tried again and let it sit on the transfer to see if the
> processes would wake up, but it read from remote host that connection
> timed out.  I'm not sure but this may be due to the fact i'm on an
> unstable link... I'll try once more with a ssh session on the side to
> see if that session will get disconnected or not...
> 
> It would be so nice if unison could 'remember' the changes on my HD
> against its local archive...  anyway...
> 
> Thanks, Simon

An unstable link is probably triggering your issue. If the link dies and
comes back, unison (at least version 2.27.57, what I have here) gets
confused and just sits there. What's interesting is that if unison is
killed on the initiating machine, the remote process stops as well,
which leads me to believe this is a bug in unison; they can talk, but
they don't do anything. I've glanced at the code before despite my lack
of familiarity with OCaml, as my wireless connection will often die,
causing much grief, but I've never found a solution.

You could try syncing subdirectories iteratively within what you want to
sync and hope that your connection does not die during the smaller sync,
but that really isn't a good solution. I personally use this method to
speed up synchronization if, for example, I only need my latest CS
project synchronized but not any new music I may have. Unison is smart
enough to use the same hash database if you use the same root
directories and use the Path directive in your configuration to limit
what is synchronized, so it should not re-hash your files on a later
sync.

As for other solutions, if you cannot get unison to work with your
connection, I would suggest using a DVCS. I tried synchronizing my home
directory with git before finding unison. The DVCS approach is better
than SVN or CVS because it takes up less space and does not require a
server. The disadvantages are the increased space used to store the
backend files and the need to commit all of your files before
pushing/pulling to/from the other machine (though I guess that could be
an advantage, depending on your needs). It isn't optimal, but it can
work, despite the git manual specifically mentioning that git was not
made to do such a thing. Mercurial might work better, but I've never
tried to use it. You might hit the same issues if the connection dies; I
don't know.

If you do find something that works similar to unison, but is more
robust, I'd love to hear about it. I've tired a number of things, but I
keep coming back to unison, despite its issues.

Regards,

Brandon Vargo


Reply via email to