Monitor the file for changes. If the file is changed, run a script to copy that file to other servers using scp or rsync.
i am looking for automatic script to copy the changes in the file from local server to another server ..
Monitor the file for changes. If the file is changed, run a script to copy that file to other servers using scp or rsync.
i am looking for automatic script to copy the changes in the file from local server to another server ..
You can do it with lsyncd. It's using inotify so is reacting very fast even with big datasets.
rsync will only synchronize files that have been changed. You can set up an rsync command that will synchronize every hour or at a specified time interval and it will only sync the files that have been changed.