unison同步

本文介绍如何在两台CentOS 6.5系统上安装Unison,并通过SSH进行文件夹之间的同步操作。详细记录了安装OCaml及Unison的过程,展示了具体的同步命令与示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

操作系统:两台CentOS6.5

unison 网站http://www.seas.upenn.edu/~bcpierce/unison//download/releases/

安装ocaml包

两台分别安装

[root@VMware ocaml]# rpm -ivh ocaml-runtime-3.11.2-2.el6.x86_64.rpm
warning: ocaml-runtime-3.11.2-2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:ocaml-runtime          ########################################### [100%]
[root@VMware ocaml]# rpm -ivh ocaml-3.11.2-2.el6.x86_64.rpm
warning: ocaml-3.11.2-2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:ocaml                  ########################################### [100%]

[root@VMware unison]# rpm -ivh unison227-2.27.57-13.el6.x86_64.rpm
warning: unison227-2.27.57-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:unison227              ########################################### [100%]

同步命令:

[root@VMware ftp100]# unison /home/ftp100/ ssh://root@172.16.233.100//var/ftp/pub/ovirt
Contacting server...
root@172.16.233.100's password:
Connected [//VMware.localdomain//home/ftp100 -> //dell380.kedacom.com//var/ftp/pub/ovirt]
Looking for changes
Warning: No archive files were found for these roots, whose canonical names are:
        /home/ftp100
        //dell380.kedacom.com//var/ftp/pub/ovirt
This can happen either
because this is the first time you have synchronized these roots,
or because you have upgraded Unison to a new version with a different
archive format.  

Update detection may take a while on this run if the replicas are
large.

Unison will assume that the 'last synchronized state' of both replicas
was completely empty.  This means that any files that are different
will be reported as conflicts, and any files that exist only on one
replica will be judged as new and propagated to the other replica.
If the two replicas are identical, then no changes will be reported.

If you see this message repeatedly, it may be because one of your machines
is getting its address from DHCP, which is causing its host name to change
between synchronizations.  See the documentation for the UNISONLOCALHOSTNAME
environment variable for advice on how to correct this.

Donations to the Unison project are gratefully accepted:
http://www.cis.upenn.edu/~bcpierce/unison

Press return to continue.[<spc>]   Waiting for changes from server
Reconciling changes

local          dell380.k...       
         <---- dir        dependency  [f]
         <---- file       epel-release-6-8.noarch.rpm  [f] f
         <---- dir        iso  [f]
dir      ---->            ovirt  [f] f
         <---- dir        patch  [f]
         <---- dir        releases  [f] f
         <---- dir        tools  [f] f

Proceed with propagating updates? [] y
Propagating updates


UNISON 2.27.57 started propagating changes at 14:54:47 on 19 Mar 2014
[BGN] Copying dependency from //dell380.kedacom.com//var/ftp/pub/ovirt to /home/ftp100
[BGN] Copying epel-release-6-8.noarch.rpm from //dell380.kedacom.com//var/ftp/pub/ovirt to /home/ftp100
[BGN] Copying iso from //dell380.wwb.com//var/ftp/pub/ovirt to /home/ftp100
[BGN] Copying ovirt from /home/ftp100 to //dell380.kedacom.com//var/ftp/pub/ovirt
[BGN] Copying patch from //dell380.wwb.com//var/ftp/pub/ovirt to /home/ftp100
[BGN] Copying releases from //dell380.wwb.com//var/ftp/pub/ovirt to /home/ftp100
[BGN] Copying tools from //dell380.wwb.com//var/ftp/pub/ovirt to /home/ftp100
[END] Copying ovirt
[END] Copying tools
[END] Copying dependency
[END] Copying epel-release-6-8.noarch.rpm
[END] Copying patch
[END] Copying iso
[END] Copying releases
UNISON 2.27.57 finished propagating changes at 15:02:38 on 19 Mar 2014


Saving synchronizer state
Synchronization complete  (7 items transferred, 0 skipped, 0 failures)
[root@VMware ftp100]#

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

测试老吴

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值