Chinaunix首页 | 论坛 | 博客
  • 博客访问: 232332
  • 博文数量: 59
  • 博客积分: 2661
  • 博客等级: 少校
  • 技术积分: 732
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-24 11:54
文章分类

全部博文(59)

文章存档

2013年(1)

2012年(8)

2011年(17)

2010年(33)

我的朋友

分类:

2011-03-10 11:19:21

上面是转帖的unison介绍和使用,参照其中的步骤,碰到一些问题,把解决方法记录下来供大家参考!

1、软件更新了新版本,

unison各种版本下载地址:

unison编译器下载地址:

我的安装脚本如下:

tar -zxf ocaml-3.11.1.tar.gz
cd ocaml-3.11.1
./configure
make world opt
make install


tar -zxf unison-2.27.157.tar.gz
cd unison-2.27.157
make UISTYLE=text
chmod 0755 unison
cp unison /usr/bin/

注意:原文中unison 的make install可以不用,在安装过程中,会出现:etags: command not found

的错误,不过不用管它,不影响使用!

2、原文中没有提到很重要的一点,就是可以用path指定根目录中需要同步的一部分目录!

即:用两个root指定两个需要同步的根目录,然后用path指定你需要同步的目录,用ignore指定path中需要排除的目录!

附我的配置文件如下(一些配置用默认的就可以,不用像原文中那样特意指定):

# Roots of the synchronization
root = /data
root = ssh://root@10.0.0.1//data

# Paths to synchronize
path = bbs/attachments
path = uc/data/avatar
path = uchome/attachment

# Some regexps specifying names and paths to ignore
ignore = Path bbs/attachments/swfupload
ignore = Name temp.*
ignore = Name *~
ignore = Name .*~
ignore = Name *.mp3

batch = true
logfile = /root/.unison/web.log

阅读(1534) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~