加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Rsync:处理绝对符号链接

发布时间:2020-12-13 17:02:59 所属栏目:Linux 来源:网络整理
导读:通读了rsync手册页后,我看不到rsync在机器之间自动转换绝对符号链接的任何方法,即 Server Afile - /home/username/path/fileServer Bfile - /home/differentusername/path/file 任何想法(记住rsync只能在/ home / username /下运行)? 解决方法 这些信息会导
通读了rsync手册页后,我看不到rsync在机器之间自动转换绝对符号链接的任何方法,即
Server A
file -> /home/username/path/file

Server B
file -> /home/differentusername/path/file

任何想法(记住rsync只能在/ home / username /下运行)?

解决方法

这些信息会导致解决方案吗?

来自man rsync:

. . .

If you
want to duplicate a server-side symlink,include both the symlink via its path,and referent directory via its real path.

. . .

It is also possible to limit the amount of path information that
is sent as implied directories for each path you specify. With
a modern rsync on the sending side (beginning with 2.6.7),you
can insert a dot and a slash into the source path,like this:

rsync -avR /foo/./bar/baz.c remote:/tmp/

That would create /tmp/bar/baz.c on the remote machine. (Note
that the dot must be followed by a slash,so “/foo/.” would not
be abbreviated.)

. . .

[省略了有关rsync早期版本的一些信息]

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读