|
UNISON Replication Directory SynchronizationIf you use two or more different computers that are sometimes disconnected from one another, then the need may arise to have some directories on each computer synchronized with one another. Some components of Windows (such as Windows Explorer and the Briefcase) can be used to streamline a "manual" approach to keeping the computers synchronized, but none of these methods can automatically prevent losing changes in the case where both computers' copies of the file were updated while the computers were disconnected from one another. The UNISON program allows you to synchronize directories of two computers by intelligently copying the files that were changed on just one computer to the other computer, and by deleting files that once existed on both computers, but now exist on only one computer. Directory and AUTOEXEC.BAT Changes The following directories are added:
The following lines are added to AUTOEXEC.BAT:
http://www.cis.upenn.edu/~bcpierce/unison/ Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. This web page has full installation instructions. I recommend you download both the graphical and command-line versions of Unison, and then do the following to make them available to your programs: For the graphical Unison program, create a shortcut to it in a folder under c:\windows\Start Menu\Programs. For the command line Unison program, create a folder named UNISON\BIN in the root, and include it in the Autoexec.bat PATH. Rename the program UNISON.EXE. To make a clickable (but otherwise automatic) synchronization, create a file called AnyNameYouLike.BAT, and put it under c:\windows\Start Menu\Programs. In the BAT file, put a single Unison command, such as
And a profile called SyncMyDoc.prf in C:\UNISON\.unison that looks like this:
To synchronize windows directories to one another (including mapped drives that can be on other systems), all you need is the Unison program. But if you want to synchronize windows and UNIX directories with one another, you'll need a secure shell, such as OPENSSH from Redhat. UNISON optionsUsage: unison [options] Root: A replica's root tells Unison where to find a set of files to be synchronized, either on the local machine or on a remote host. For example,
specifies a local root relative to the directory where Unison is started, while
specifies a root relative to the top of the local filesystem, independent of where Unison is running. Remote roots can begin with ssh://, rsh:// to indicate that the remote server should be started with rsh or ssh:
If the remote server is already running (in socket mode), then the syntax
Options:
OPENSSHhttp://sources.redhat.com/cygwin/ The Cygwin tools are ports of the popular GNU development tools and utilities for Windows 95, 98, and NT. They function by using the Cygwin library which provides a UNIX-like API on top of the Win32 API. Click the link labeled "Install Cygwin Now", and then do the following:
When you are given a menu of several dozen programs to install, you can go ahead and install all of them, but if you have a slow line, you should click the special icon that changes each program (except the ones you really need) to "SKIP". The programs you really need to implement OPENSSH are: ash,
SSH options
|