I tried with copying directory and files to remote Linux machine using rsync and incrontab.
It's working fine copying files to remote server.
Incrontab
/data/AMOS_SHARE/CHV_BE/ IN_MODIFY,IN_CREATE,IN_DELETE,IN_CLOSE_WRITE,IN_MOVE /data/AMOS/jboss/chv_rsync.sh
Rsync
#!/bin/bash
chmod -R 775 /data/AMOS_SHARE/CHV_BE
rsync -avuzh /data/AMOS_SHARE/CHV_BE/ jboss@xx.xx.xx.xx:/data/AMOS_SHARE/CHV_BE/
I created some files in /data/AMOS_SHARE/CHV_BE/
folder. It worked fine as well as I created folder in that, it is also working fine. But whenever I creat files in a sub folder, it's not working.
Please help me out.