微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Rsync:处理绝对符号链接

通读了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早期版本的一些信息]

原文地址:https://www.jb51.cc/linux/399206.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐