I am trying to set up rsync to syncronize my main web server to the remote server by adding newly generated file to the later.
Here is the command that I use:
rsync -avh --update -e "ssh -i /path/to/thishost-rsync-key" remoteuser@remotehost:/foo/bar /foo/bar
But it seems that the web server actually transfers all files despite the '--update' flag. I have tried different flag combinations (e.g omitting '-a' and using'-uv' instead) but none helped. So wondering how can I modify the rsync command to send out only newly added files. Thanks