Rsync:处理绝对符号链接

前端之家收集整理的这篇文章主要介绍了Rsync:处理绝对符号链接前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
通读了rsync手册页后,我看不到rsync在机器之间自动转换绝对符号链接的任何方法,即
Server A
file -> /home/username/path/file

Server B
file -> /home/differentusername/path/file
@H_502_4@任何想法(记住rsync只能在/ home / username /下运行)?

解决方法

这些信息会导致解决方案吗? @H_502_4@来自man rsync:

@H_502_4@. . .

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

@H_502_4@. . .

@H_502_4@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:

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

@H_502_4@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.)

@H_502_4@. . .

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

猜你在找的Linux相关文章