rsync dir in _both_ directions?

Martin Pool mbp at samba.org
Wed Feb 6 16:04:20 EST 2002


On  5 Feb 2002, Jack McKinney <jackmc-rsync at lorentz.com> wrote:
> Big Brother tells me that Dave Dykstra wrote:
> > On Mon, Feb 04, 2002 at 11:58:04AM -0600, Jack McKinney wrote:
> > > If I change the status on the first message in the box (reply to it, delete
> > > it), then the ENTIRE mailbox is re-copied.  Not so in maildir format.
> > 
> > Are you sure about that?  Rsync is able to locate identical blocks that
> > are in a different position.
> 
>     Yes.  blocks are 512 bytes long.  If I add a 14 byte header on a message
> near the beginning, then there are no identical blocks.

In this case there are identical blocks starting just after the
inserted header.  You might not expect rsync to handle this case, but
it does!

>     It can take 5-30 minutes to finish the first, and I want it to then
> start the second one without having to watch for the first one.  I prefer
> not to use ssh's feature to remember keys or to use .rhosts/.shosts.

Make a little shell script:

  eval `ssh-agent`
  ssh-add
  rsync foo bar
  rsync qux zump
  ..
  kill $SSH_AGENT_PID

As before, you type your unlock passphrase exactly once; on conclusion
of the script it is gone from memory.

-- 
Martin 




More information about the rsync mailing list