I have one main machine and a group of remote ones. I want to keep a track of a certain folder on each of the remote machines and copy its content to a certain folder in my main machine. The remote machines shouldn't communicate between themselves. What's a better way to do that? I figure it's rsync. If so, should I install and run it a) on my main machine and do pull or b) instead run it on each of the remote machines and do push? Is there a big difference between these 2 options? Or are there better options apart from rsync?
Pull vs. push is largely a matter of expectations. Which of these scenarios do you consider to be more likely or to occur more frequently?
- The source system is up, but the destination system is down
- The destination system is up, but the source system is down
Assuming one of your goals is to reduce the rate of failure of the sync, then if the answer is 1., then you should consider using a pulling model and if the answer is 2., then you should consider using a pushing model.
As for whether your syncing tool is rsync or something else, this is largely a matter of opinion and we probably can't provide good answers without more details on your particular setup and scenario.