I have to push data from a server to another.

On the source, I have a folder (named vhosts) containing files, folders and symlinks. I want all this to be copied as files (not as symlinks)

On the destination, I have a folder (named vhosts) to receive all files. This folder contains one folder that is a symlink to another volume because the data it will receive is too big for that disk. That is why a folder was created as a symlink to another volume.

I ran a couple of commands with different parameters. The last I got was this:

rsync -rLzP vhosts/ user@

The problem is that this deleted my symbolic link on the destination folder and created a directory. The data is not copied to the second volume so I won't be able to complete the task. I thought -L would solve it but it has not the impact I was expecting.

What am I missing?

| improve this question | | | | |

You need --keep-dirlinks

--keep-dirlinks treat symlinked dir on receiver as dir

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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