I use sersync a lot. It can indeed meet your needs and can lay out a complex structure. However, I would like to remind you that there are many disadvantages. It is more troublesome to manage multiple nodes, and there is no detailed information. Logging and rollback methods.
In fact, this tool uses inotify+rsync but uses a multi-process approach and adds configuration management, so it is easier to use than ordinary tools.
If you have the energy, you can try to modify it, and it can be implemented well if you switch to other languages. Such as GO language, python.
Previously used:
The sersync mentioned by @qrpeng should also be good, completely suitable for LZ scenarios.
I use sersync a lot. It can indeed meet your needs and can lay out a complex structure. However, I would like to remind you that there are many disadvantages. It is more troublesome to manage multiple nodes, and there is no detailed information. Logging and rollback methods. In fact, this tool uses inotify+rsync but uses a multi-process approach and adds configuration management, so it is easier to use than ordinary tools. If you have the energy, you can try to modify it, and it can be implemented well if you switch to other languages. Such as GO language, python.
You can try sersync