Am 06. Nov, 2007 schwätzte Dan Lund so: > There's an application called unison that'll take care of > bidirectional synchronizations pretty easily. > http://www.cis.upenn.edu/~bcpierce/unison/ Unison is great. I recently did a mini-presentation on it at a east side meeting. Unison doesn't handle hard links. That's probably fine for most people, but doesn't work for some of my filesyncing needs. Make sure to add "times = true" to the config! That makes it much easier to figure out what's going on when you're reviewing the changes. The only times I end up with conflicts is when a file was changed on both sides between syncs. It gives you an opportunity to diff the files. Unison can be run via command line and therefore via cron. I also use unison to sync one data repository with several machines with changes happening on each of the machines. Again it works unless a file was changed on multiple machines prior to propagation. You can choose to have unison take the default action and it'll move things without conflicts ( including file deletions ) and leave the files that are in conflict. Theoretically. I haven't actually gotten to the point where I automate it that much. Unison maintains a DB of the files in the repositories, so it can determine if they've changed locally. Here's info from the rsync manpage: ### To synchronize my samba source trees I use the following Makefile tar? gets: get: rsync -avuzb --exclude ?*~? samba:samba/ . put: rsync -Cavuzb . samba:samba/ sync: get put this allows me to sync with a CVS directory at the other end of the connection. I then do CVS operations on the remote machine, which saves a lot of time as the remote CVS protocol isn?t very efficient. ### I don't know if that'll fit your needs. There's also tra, but the whole 'this is experimental' thing and lack of updates since 2002 keeps me from trying it :). drsync - wrapper for file synchronisation via rsync syrep - A generic file repository synchronization tool Looks like syrep handles hardlinks, but not modification times or permissions. ciao, der.hans > On 11/6/07, Shawn Badger wrote: >> I need to sync a folder on 2 servers, sounds easy, but the catch is that >> they basically have to mirror each other. So if I deleted a file on one it >> goes away on the other, but If I add a file it shows up on both. The catch >> is that a file could be added or deleted form either system. Is there a way >> to make rsync catch these changes and make sure they get mirrored? The other >> option I am thinking about involves running a script that copies new files >> to a "holding area" and point both servers to the holding area for the sync >> source. the downside to that is I don't know how to handle deletes. I >> haven't had much luck with Google on this yet, but I am still looking. -- # https://www.LuftHans.com/ http://www.CiscoLearning.org/ # Eternal vigilance is the price of liberty. -- Thomas Jefferson