I'm looking for a robust way to synchronize files from my account on an
IRIX machine (running NFS) with laptop's linux account. I want to be
able to edit freely on either account (create, delete, move, and modify
files) and then synchronize the two (with warnings when my edits
conflict).
So far, I've found two mechanisms that might help in accomplishing this:
rsync and rdist.
As far as I can tell, rsync is like a more general version of rcp. It
operates at the level of individual files, so I would have to contruct
all of the higher-level mechanism for synchronizing directories and
subdirectories on my own.
rdist is a higher-level mechanism, but it is primarily intended for
maintaining mirrors, with all the changes occuring at one main site, and
allowing propagation of the changes to other sites. It is possible to
run rdist on each of the file systems I wish to synchronize, but there
are still lots of details that would have to be handled outside the
rdist command to make things really work correctly.
rdist does have a mechanism to avoid replacing young files with old
ones, but if I delete a file on one end, it would get written back when
I sync. I guess an important feature that's not built into rdist is the
ability to record when the last synchronization was and only make
updates for files modified since that time. Even this would have
problems if I rename a file, because that doesn't change the file
modification time (in a correct system, if I rename a file on one side,
it should probably be deleted and recreated on the other side, since
there's no way to actually record the rename event).
One solution might be to actually do an 'ls' of the synchronized files
at the time of synchronization, then at the next sync, compare the
current state to the previous state.
Anyhow, I'm trying to avoid writing some complicated scripts from
scratch, because I know there's a good chance I won't get it right, and
that would be a BadThing.
Anyone know of a way that already exists to do my synchronization
correctly (I prefer not to have to keep all my files under some revision
control like CVS - I do use RCS for some of my source code development,
but it wouldn't be so good for my binary data file, etc.)
Thanks for any ideas or pointers. Sorry for the long-winded question.
Jon