Using rsync for two-waz-synchronisation

Seemueller, Andreas andreas.seemueller at m.eads.net
Tue Sep 17 06:02:01 EST 2002


Hello,

is there any way to use rsync for two-way-syncronisation? I want to use 
it to keep the data on two hosts consistent. Sometimes one of this hosts 
(sometimes the first, sometimes the second) changes its location.
If the two hosts are at the same location I want automatically rsync them.
The data only changes at one hosts but it is not defined on which host 
it changes.
For example:
I have this structure on host 1:
	/Desktop
	/Pictures
	/blabla
	test.txt
	info.txt

If rsync from host 1 to host 2, host2 has the same structure.
This are my options:
rsync -e "ssh -1" -a --delete --exclude "lost+found" /somepath 
somehost:/somepath

If I create a file on host 1 and run rsync again the file is also on host 2.
But: If I create a file on host 2 and run rsync on host 1 the file is 
deleted on host 2. If I use -u instead of --delete files that changed on 
host 2 are not overwritten but they are also not copied to host 1.

I want to have the same files on both hosts by running rsync as cronjob 
on one host.

with kind regards
-- 
Andreas Seemüller

EADS Deutschland GmbH
European Aeronautic Defence and Space Company
Business Unit Military Aircraft
MT641 - Simulationsanlagen
81663 München
Tel. +49 (89) 607-22809
Fax  +49 (89) 607-22491
Email: andreas.seemueller at m.eads.net
-- 




More information about the rsync mailing list