Roland Turner

about | contact

Preventing rsync from polluting a destination directory during transfer

(e.g. When the directory that rsync is copying to is, itself, a publicly visible directory.)

The magic option is -T / –temp-dir and note that if you don’t want it to be a sub-directory of the target (which is probably the whole point if you’re trying to avoid contaminating a publicly visible directory) you’ll need to specify an absolute path (starts with ‘/’) rather than a relative one.

This is obvious in retrospect except that I’d assumed that –partial did this (it doesn’t).