Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have directories and files locally and I want to copy them over to another box using rsync . The problem is that most of the data is already on the remove box, but not on the target disk. E.g., I have

local:~/$ ls -F
a/ b/ foo

and

remote:~/dest$ ls -F
a@

where remote:~/dest/a points to a directory which already contains most of local:~/a.

When I do

local$ rsync --append-verify --progress -auv * remote:~/dest/

symlink remote:~/dest/a is replaced with an empty directory where rsync starts copying data from local.

How do I accomplish the effect of

local$ rsync --append-verify --progress -auv foo remote:~/dest/
local$ rsync --append-verify --progress -auv a/* remote:~/dest/a/
local$ rsync --append-verify --progress -auv b remote:~/dest/

with a single rsync invocation?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

From the rsync man page :

    -K, --keep-dirlinks         treat symlinked dir on receiver as dir
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.