这里的任务非常简单:在星形拓扑中使用一致来同步/home
多个服务器之间的文件夹。所以,对于~/.unison/default.prf
每个盒子......
中心:
root =
root = ssh://spoke1/
path = current
ignore = Name .bash*
ignore = Path .cahce
ignore = Path .dbus
ignore = Name .fehbg
ignore = Path .fluxbox
ignore = Name .profile
ignore = Path .ssh
ignore = Path .vnc
ignore = Name .Xauthority
ignore = Name .xsession-errors
和辐条1:
root =
root = ssh://hub/
path = current
ignore = Name .bash*
ignore = Path .cahce
ignore = Path .dbus
ignore = Name .fehbg
ignore = Path .fluxbox
ignore = Name .profile
ignore = Path .ssh
ignore = Path .vnc
ignore = Name .Xauthority
ignore = Name .xsession-errors
与testServer
旗帜一致运行:
user1@hub:~$ unison -testServer
Contacting server...
Connected [//hub//home/user1 -> //spoke1//home/user1]
但是当我运行 unison plain 时,它一直在抱怨:
Warning: No archive files were found for these roots, whose canonical names are:
/home/user1
//spoke1//home/user1
即使我更改了用户的文件夹。我已经尝试过两个方向,甚至尝试过设置UNISONLOCALHOSTNAME
,但似乎没有什么区别。我缺少什么?
答案1
只有您的 Spoke1 机器应该有~/.unison/default.prf
.在该配置文件中,您需要指定两个根:当前计算机上要同步的路径和远程计算机上的路径。你~/.unison/default.prf
应该看看更接近这个:
root = /home/user1
root = ssh://user1@spoke//home/user1
ignore = Name .bash*
...
你不需要那条path = current
线。仅当您想指定要同步的某些目录时(让该行path = Desktop
同步仅有的目录/home/user1/Desktop
)。由于您想要同步整个主目录,因此没有必要。
另外,请检查您的拼写cache
:)