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).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: