I want to mirror some home directories to a remote location, but don't want to follow links that point outside the tree. Links pointing with the directories themselves are okay.

I also want the links to be present in the mirror, ie they should be present, only their targets won't be available. It is similar to when you create a tar archive. The links are present when the archive is untarred, with the targets missing.

Is this possible with rsync.

  • This is the default behavior. rsync does not dereference symlinks without you telling it to. – Patrick Sep 26 '14 at 3:17

Use archive mode to achieve this

rsync -a
| 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.