2 Way Syncing

jw schultz jw at pegasys.ws
Wed Feb 26 08:14:00 EST 2003

On Tue, Feb 25, 2003 at 09:48:12AM -0500, Bennett Todd wrote:
> 2003-02-25T08:52:38 va_public <yahoogroups at vikas.mailshell.com>:
> > --- In rsync at yahoogroups.com, Wayne Davison <wayned at u...> wrote:
> > > On Mon, Feb 24, 2003 at 08:13:15PM -0800, Len Sh wrote:
> > > > I need to be-able to sync both ways so the files can be changed on
> > > > either server? 
> > > 
> > > I recommend using the program "unison" for this -- I find it to be
> > > indispensable.
> > 
> > Why not just use rsync as mentioned in the FAQ for this?
> > 
> > rsync --update source target
> > rsync --update target source
> The difference is there's a problem unison solves, that rsync
> cannot.
> Suppose a file is updated on both sides, between syncs?
> Rsync has no way of knowing that that has happened; in the above
> back-n-forth --update, rsync will overwrite the older file with the
> newer; the edits made first will be lost.
> Unison can recognize this situation and report the conflicting
> edits.
> This is possible because Unison keeps some private data, notes to
> itself describing the last state in which it left the files.
> Rsync on the other hand looks at only the actual state of the files
> as found on disk, it has no private notes to itself. This is a
> strength in some applications and a weakness in others. The two
> tools solve different problems, albeit with some overlap.

Even more common is the issue of deletion.  With the doubled
rsync files will accrete unless you delete them from both
ends manually between syncs.

Rsync is ill suited for bidirectional syncing.  It will miss
some things and do others you don't want.

Unison is perfect for the bidirectional sync but for
unidirectional, especially backups, it has it's own

There is a reason the toolbox was invented.

	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt

More information about the rsync mailing list