hi, i have 2 servers SERVER1 and SERVER2. They are networked as follows:
+---------(wan)----------------------+
| |
users------server1-----(wan)-----server2-----users
(diagram omits any routers, firewalls, etc.)
The wan link is a bit slow so users accessing a share called "shared" on server1 waste alot of time for even small files to open across the wan (vpn).
so, i thought, why not just mirror server1:/shared onto server2 using 2 rsyncs (rsync in one direction, then in the other)? sounds like a great idea, but i had a few problems in such a setup.
suppose there are files added/deleted on server2 and different files being added and deleted on server1... if server2 then starts an rsync to send its changed files over to server1, it will rsync back the files that were deleted on server1. Also, if the --delete option is used, then new files on server1 are deleted because they do not exist on server2. also, suppose a file is changed on server1, and server2 is rsynced to server1, the older file will be synced back to server1.
it looks like rsync was really meant with other hosts syncing from a master host and not any kind of bi-directional mirroring.
any rsync savy persons out there know of a hack to get this to work? i was thinking about looking at other things instead of rsync like drbd, but dont know (yet) how well that works via semi-slow links.
thanksl

