Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] sync'ing two computers (not related to emerge)
Date: Sat, 02 May 2009 22:22:04
Message-Id: 200905030020.24585.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] sync'ing two computers (not related to emerge) by Simon
1 On Saturday 02 May 2009 23:33:38 Simon wrote:
2 > hi there!
3 > I've been using unison to synchronise and backup my computers. unison is
4 > based on rsync IIRC but with the difference that it 'remembers' the state
5 > of the folder that was synchronised. This way, if I delete a file on A,
6 > when sync'ing it will be deleted on B. While rsync would leave the file on
7 > B...
8
9 I assume you are syncing from A to B? In that case you should look at the
10 various --delete* options to rsync
11
12 > I see rsync as a very good 'cp' program, but I need something that can
13 > deal with conflicts (file changed on both hosts/directories) and can
14 > propagate changes like deletes properly. Is there a way to get this
15 > behavior with rsync (maybe i missed something)?
16
17 This cannot be done with rsync. It's very much an efficient scp replacement
18 that works with deltas. And there is a definite source and destination, what
19 you are describing is like how source repos work
20
21 > The reason i'm asking is that unison has been having problems recently in
22 > sync'ing two pc... On my laptop, when i start the sync, it first checks it
23 > for changes against the 'unison snapshot'. Changes done since last sync
24 > are those that will be propagated. But it takes so long to check for
25 > changes (disk input rate is too slow i think) that once it finished, when
26 > it's time to send the changes to the remote server, the remote end has
27 > already disconnected!
28
29 Surely unison has a --timeout or similar option?
30 rsync has it, and it's such an obviously needed config option
31
32
33 --
34 alan dot mckinnon at gmail dot com