0

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@10.0.0.23:/home/user/vhosts/

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?

0

You need --keep-dirlinks

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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