RSync: How do I synchronize in both directions?

后端 未结 8 1579
野的像风
野的像风 2020-12-07 09:00

I want to use rsync to synchronize two directories in both directions.

I refer to synchronization in classical sense (not how it is

8条回答
  •  长情又很酷
    2020-12-07 09:39

    I'm using rsync with inotifywait. When you change any file, rsync will be executed.

    inotifywait -m --exclude "$_LOG_FILE" -r -e create,delete,delete_self,modify,moved_to --format "%w%f" "$folder"
    

    You need run inotifywait on both host. Please check example inotifywait

提交回复
热议问题