McRaeClan.Com Home
 Links 

email

Search Engines
Kids' Stuff
Sports
Audio (StreamingRadio)
Music
Movies
How to Make a Home Page
Tools
Find a Host
Web Design
Advanced Techniques
Fun Sites to Explore
"Link of the Day"
Funnies
Home Pages
Job, Career
Colleges, Education
Food
Running
Information Sources
The BibleLanguage 
For School Reports

e-Books, Catalogs
Math, Science, Philosophy 
High School Reunion
Financial / Investment Info
Banks
Brokers, Exchanges
Stock Prices, News
Advice, Tricks, and Screening
Web Publishers
Newspapers
Television Networks
Technical Journals
Web-Zines
Financial Magazines
Retailers
Consumer Guides
Books, etc.
Computer
Auctions, Other
Shipping
Local Guide
Restaurants
Travel
Airlines
Discount Tickets
Computers
vi, ASP, JavaScript
Consulting 
Software Windows 

Hardware Vendors
IBM Mainframe, AS/400
Training

UNISON Replication
UNIX Utilities for Windows

Directory Synchronization

If 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:

C:\UNISON
C:\UNISON\BIN
C:\CYGWIN
C:\CYGWIN\BIN

The following lines are added to AUTOEXEC.BAT:

REM CYGWIN AND "HOME" ARE NEEDED FOR UNISON DIRECTORY SYNC TO WORK
PATH C:\UNISON\BIN;C:\CYGWIN\BIN;%PATH%
SET HOME=C:\UNISON

UNISON for Replication

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

@echo off
rem Unison Synchronization
rem -auto will prompt for unresolvable conflicts
rem -batch will skip unresolvable conflicts
unison SyncMyDoc -auto
notepad C:\UNISON\unison.log

And a profile called SyncMyDoc.prf in C:\UNISON\.unison that looks like this:

# Unison preferences
root = C:\My Documents\
root = P:\My Documents\
#ignore = Path ExtraInstructions
ignore = Name temp.*
ignore = Name *~
ignore = Name .*~
ignore = Name *.o
ignore = Name *.tmp

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 options

Usage: unison [options]
    or unison root1 root2 [options]
    or unison profilename [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,

relative/path/of/root

specifies a local root relative to the directory where Unison is started, while

/absolute/path/of/root

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:

ssh://remotehost//absolute/path/of/root
rsh://user@remotehost/relative/path/of/root

If the remote server is already running (in socket mode), then the syntax

socket://remotehost:portnum//absolute/path/of/root
socket://remotehost:portnum/relative/path/of/root

Options:

-addversionno add version number to name of unison executable on server
-auto automatically accept default actions
-backupskeep backup copies when propagating changes
-batchbatch mode: ask no questions at all
-debug xxxdebug module xxx ('all' -> everything, 'verbose' -> more)
-defaultpath xxxpath to synchronize by default
-doc xxxshow documentation ('-doc topics' lists topics)
-dumbttydo not try to change terminal settings in text UI
-force xxxforce changes from this replica to the other
-groupsynchronize group
-height nheight (in lines) of main window in graphical interface
-killServerkill server when done (even when using sockets)
-logRecord actions in file specified by logfile preference
-logfile xxxLog file name
-numericIdsdon't map uid/gid values by user/group names
-ownersynchronize owner
-path xxxpath to synchronize
-perms npart of the permissions which is synchronized
-prefer xxxchoose this replica's version in case of conflict
-root xxxroot of a replica
-rshargs xxxother arguments (if any) for remote shell command
-servercmd xxxname of unison executable on remote server
-socket xxxact as a server on a socket
-sortbysizelist changed files by size, not name
-sortnewfirstlist new before changed files
-statusdepth nStatus display depth for local files
-testServerexit immediately after the connection to the server
-timessynchronize modification times
-ui xxxtype of user interface ('text' or 'graphic')
-versionprint version and exit
UNIX Utilities for Windows

OPENSSH

http://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:

bulletWhen asked whether to save the setup.exe file or run it from its current location, chose to run it from its current location.
bulletWhen given a choice to "install from Internet", do so.
bulletChoose "Dos-Style Text Files"
bulletIf you have Internet Explorer version 5 installed, then choose to use the "I.E. 5 settings"

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,
bash,
cygwin,
and
openssh.

 

SSH options

-l userLog in using this user name.
-nRedirect input from /dev/null
-AEnable authentication agent forwarding.
-aDisable authentication agent forwarding.
-XEnable X11 connection forwarding
-xDisable X11 connection forwarding.
-i fileIdentity for RSA authentication (default: ~/.ssh/identity).
-tTty; allocate a tty even if command is given.
-TDo not allocate a tty.
-vVerbose.  Multiple -v increases verbosity.
-VDisplay version number only.
-PDon't allocate a privileged prot.
-qQuiet; don't display any warning messages.
-fFork into background after authentication.
-e charSet escape character; "none" = disable (default: ~).
-c cipherSelet encryption algorithm: "3des", "blowfish"
-p portConnect to this port.  Server must be on the same port.
-L listen-port:host:portForward local port to remote address
-R listen-port:host:portForward remote port to local address.
   These cause /usr/bin/SSH to listen for connections on a port, and forward them to the other side by connecting to host:port.
-CEnable compression.
-NDo not execute a shell or command.
-gAllow remote hosts to connect to forwarded ports.
-4Use IPv4 only.
-6Use IPv6 only.
-2Force protocol version 2.
-o 'option'Process the option as if it were read from a configuration file.