Rsync temporary files

Hi,

I am looking to use rsync in a very specific way, and even though I have trawled the rsync man pages I have not succeeded in seeing a way of doing the following:

  1. The temporary files created by rsync should not be created in the destination directory. (I have used --temp-dir option to do this)
  2. Files that have been copied over to the temporary directory, are then moved to the destination directory, deleting any file with the same name first.

The reason for these very particular requirements, is that I have inotifywait monitoring the destination directory and watching for the "create" event (not the modified).

Can anyone help with 2?

Thanks,
LITW