Frank Sorenson wrote:
On Thu, 25 Sep 2003, Hyrum Wright said:

I've got the good ol' desktop at home, along with a headless server in
my closet and a laptop that I use between school and work.  I bring the
laptop home every evening, generally because I've made progress on
things on the laptop, which I then want to work on on the desktop,
because it is a much better box.  The main question then, is this:  What
would be an easy way to sync the desktop with the laptop every evening,
and do the opposite in the mornings when I leave for school again?  I've
contemplated things such as NFS mount points on the server for both the
laptop and the desktop, but I'm not sure what the best way to do it
would be.  Thanks.

-Hyrum


Recently, I've had _very_ good success with unison. I've been using it to sync my thesis and related programs between my laptop, my desktop, and a Single Board Computer. I can do my work on the laptop or the other machines, and the changes are syncronized by unison.

It can tell which files have been modified where, and only starts barfing
if both copies have changed.  Even then, it'll show diffs, and you can
either merge the changes or modify the files manually.

I'd like to second the vote for Unison. It uses the same protocol for transferring changes that CVS and rsync use (it's efficient), but it's made to tolerate changes on both ends.

If you want to keep a history of your changes then CVS might be a good idea, but you get the extra headache of log entries, special procedures for removing, adding, and moving files, etc..

With Unison you create a config file (which has two lines minimally) and from then on you just type 'unison' and it goes. It handles deletions and moves / renames (as a deletion and then an addition) without extra troubles, and will save backups if you want it to. If your session dies unexpectedly you're okay because it doesn't commit a change until it know's it's safe (it does this by making a new file and renaming it when it's synced).

Unison will work with local filesystems, a terribly insecure socket connection, or over ssh. If you've got public key auth and an agent running it can be as simple as one command and you're done.

It doesn't even rely on the clock to decide if a change has been made, so skew is never a problem. Instead it only looks at whether or not some change has been made since the last sync with your host.

Conflict resolution must, of course, be done manually, but you can't ask for better than that.

You really should use the SSH mode though, because it has to access the files to tell if there's been a change so things can get slow if you're using a network file system.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to