Home   >>   Unison   >>   Local Directory Synchronization
Local Directory Synchronization PDF Print E-mail
( 1 Vote )
How To - Unison
Written by Christian Foronda   
Wednesday, 01 September 2010 08:59

RHEL / CentOS Linux:

	# yum install unison

Debian / Ubuntu Linux:

	# apt-get update && apt-get install unison

Sample usage:

	# unison /tmp/dir1 /tmp/dir2

Sample outputs:

	Contacting server...
	Connected [//cf-desktop//tmp/dir1 -> //cf-desktop//tmp/dir2]
	Looking for changes
	Warning: No archive files were found for these roots, whose canonical names are:
		/tmp/dir1
		/tmp/dir2
	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.[] Reconciling changes

	dir1           dir2               
	file     ---->            1  [f] 
	file     ---->            2  [f] 
	file     ---->            3  [f] 

	Proceed with propagating updates? [] y
	Propagating updates


	UNISON 2.27.57 started propagating changes at 18:36:31 on 27 Aug 2010
	[BGN] Copying 1 from /tmp/dir1 to /tmp/dir2
	[END] Copying 1
	[BGN] Copying 2 from /tmp/dir1 to /tmp/dir2
	[END] Copying 2
	[BGN] Copying 3 from /tmp/dir1 to /tmp/dir2
	[END] Copying 3
	UNISON 2.27.57 finished propagating changes at 18:36:31 on 27 Aug 2010


	Saving synchronizer state
	Synchronization complete  (3 items transferred, 0 skipped, 0 failures)

Ask no question option:

	# unison -batch /tmp/test1 /tmp/test2

Sample outputs:

	Contacting server...
	Connected [//cf-desktop//tmp/dir1 -> //cf-desktop//tmp/dir2]
	Looking for changes
	Warning: No archive files were found for these roots, whose canonical names are:
		/tmp/dir1
		/tmp/dir2
	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.

	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

	Reconciling changes
	file     ---->            1  
	dir1         : file               modified on 2010-08-27 at 18:45:31  size 0         r
	dir2         : absent
	file     ---->            2  
	dir1         : file               modified on 2010-08-27 at 18:45:32  size 0         r
	dir2         : absent
	file     ---->            3  
	dir1         : file               modified on 2010-08-27 at 18:45:34  size 0         r
	dir2         : absent
	Propagating updates
	UNISON 2.27.57 started propagating changes at 18:45:48 on 27 Aug 2010
	[BGN] Copying 1 from /tmp/dir1 to /tmp/dir2
	[END] Copying 1
	[BGN] Copying 2 from /tmp/dir1 to /tmp/dir2
	[END] Copying 2
	[BGN] Copying 3 from /tmp/dir1 to /tmp/dir2
	[END] Copying 3
	UNISON 2.27.57 finished propagating changes at 18:45:48 on 27 Aug 2010
	Saving synchronizer state
	Synchronization complete  (3 items transferred, 0 skipped, 0 failures)



blog comments powered by Disqus