I have multiple folders that I rsync now with cron like in this example.
rsync -aqz source1/ user1@machine1:/some/destination1
rsync -aqz source2/ user2@machine2:/some/destination2
... and so on
Everything is running fine, but I have a lot of crontabs as root, and most of the time nothing changes, and I am just blocking processor.
I would like to start the rsync processes only when a file somewhere on source has changed.
So I have read the documentation of the rsync.conf file, but I did not understand how this works. My rsync.conf file right now looks like this :
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
&merge /etc/rsyncd.d
&include /etc/rsyncd.d
and the /etc/rsyncd.d folder is empty.
how do I need to write the config in order that the rsync runs as daemon and just syncs when a file has changed.
0 Answers