rsync dir in _both_ directions?
jackmc-rsync at lorentz.com
Tue Feb 5 04:58:04 EST 2002
I felt certain there was an option to do this, but I cannot find it.
I want to rsync a directory on machine A over to machine B, and then rsync
the directory on machine B back to machine A.
The idea is this: I read my email using mutt, which is set to save my
email in ~/Mail in maildir format. This means that each message is in its
own file, instead of being appended to an existing file. Thus, if I backup
my email by rsync'ing it to another machine, only the new messages are copied
over. Mailboxes need not be. Before you say that rsync only sends changed
blocks, and the changed blocks are at the end if the message is appended,
remember that mail readers write status into the headers of the messages.
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.
Well, I read my email on my laptop, and it is sometimes necessary to
login to a central server to read my email (firewall issues). What I do is
to peridocally sync with the central server (which we'll call "server") by:
rsync -e ssh -rptlv Mail server:.
rsync -e ssh -rptlv server:Mail .
I'd like to do this in one command. Is there a switch to rsync that
says to make the local and remote directories identical, even if that means
transfering data in both directions?
"There is no parameter that makes it impossible Jack McKinney
for you to perform still more excellently." jackmc at lorentz.com
-Mario Cuomo, on the lack of a clock in baseball http://www.lorentz.com
2002 Chicago Cubs magic number: 163
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 240 bytes
Desc: not available
Url : http://lists.samba.org/archive/rsync/attachments/20020204/dd8663e8/attachment.bin
More information about the rsync