使用 rsync 是否可以将绝对符号链接调整到目的地的新位置?
测试用例
想象一下,我有一个指向这样的文件的链接:
/usera/files/common/test_file
/usera/files/common/links/test_link -> /usera/files/common/test_file
现在我想将整个目录 rsynccommon到另一个位置。(组权限适配,看下面为什么)
rsync -av --no-g /usera/files/common/ /userb/common
这给了我:
/userb/common/test_file
/userb/common/links/test_link -> /usera/files/common/test_file
问题
问题是目标上的组与源上的组不同(安全原因),因此test_link不是指向/userb/空间而是指向/usera/,因此对于该用户来说是不可读的。
问题
是否可以告诉 rsync 调整同步点(/common/此处)下方的链接以适应新目的地?这将给出一个链接:
/userb/common/links/test_link -> /userb/common/test_file
我尝试按照类似问题的解决方案进行操作,但是它似乎没有做我想要的..
谢谢!