Emen Zhao wrote:
> Hello All,
>> Here is my scenario - I have a bunch of Linux servers. I want one of them
> act as a file server, where if any file in a specific folder gets updated,
> the updated version will be automatically push to all the other servers. Are
> there any ready-made tools up for this? Any suggestion?
Running rsync on a regular basis, while not firing the synchronisation
off on the file update event, would be a very straightforward, reliable
solution here. Set the frequency of running rsync to the frequency at
which you need any updates to be pushed out to the other servers. Also,
you may want to put a wrapper around rsync to ensure that only one
instance runs at a time (or maybe rsync has a switch to ensure this
behaviour, you'll have to check the man page).
If you're going down the file modification event route with
dnotify/inotify and so on, you may need to put some measure in place to
throttle the rate of synchronisation (such that if a lot of
modifications get made on one of the servers, you don't end up with a
huge storm of traffic immediately to all the others).
Stephen Mulcahy Atlantic Linux http://www.atlanticlinux.ie
Registered in Ireland, no. 376591 (144 Ros Caoin, Roscam, Galway)
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!