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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.