They threw us out early for the holiday.. \:\)

The following is a Unison Profile that is placed on the external Media HDD, along with a copy of UNISON. Both are in a \UNISON folder. The profile name is "MEDIASYNC.PRF". This allows you to invoke Unison with just the profile name.

"MServer" is the name of the media server where Unison is already running. Specify the path to the root of the media folder in the "root" and "force" arguments. The "force" insures a one-way replication to the forced path. The second "root" defines the path on the external HDD on the local computer. If you want 2-way sync, it's good to define a preference - replace "force" with "prefer". If the same file has been modified on both sides, the "preferred" side will win out and replace the other file.

log, batch, and times are options that enable logging, run in batch mode (no user prompting), and maintain modification times of the files during replication.

The "path" statements define the folders in the ROOT paths to sync. If these are omitted, then all subfolders are synced.

For a production sync, this configuration would be done on a slave server.
 Code:
root  = socket://MServer:1758/D:\Media\Multimedia\
force = socket://MServer:1758/D:\Media\
root  = e:\

log   = true
batch = true
times = true

path  = Music
path  = Cartoons
path  = AudioBooks
path  = Movies\Classics


The following is a SYNC.BAT file that is in the root of the external Media HDD. Note that if the local HDD on the target system is not "E:" then both the batch file and the MediaSync.Prf files will need to be updated.
 Code:
@Echo Off
REM - this script assumes that the external drive is "E:"
REM - Data will be synced from the media server to the external HDD.

Set LCLHDD=E:

REM Define the UNISON home folder
Set UNISON=%LCLHDD%\UNISON
Run the Unison command and specify the MediaSync.prf profile
%LCLHDD%\Unison MediaSync

Installing Unison as a service is simple if you use SrvAny from the Win2K Resource Kit. This can be downloaded from MS. The package consists of 2 executable files - InstSrv.exe and SrvAny.exe. The first is used to set up the service, the second is the service file itself.

On the (master) server, create a UNISON folder. (C:\Progra~2\Unison)
Create a SYSTEM environment variable called UNISON that references that path. (UNISON=C:\Progra~2\Unison)
Place the Unison.exe on the server, preferrably in the Unison folder.
Copy the SrvAny.exe to the server. It should be placed in a folder in the System PATH. C:\Windows is OK, but I prefer a dedicated folder for add-on server tools like this. Your choice.
You don't need to copy the InstSrv.exe file to the server.. just run "InstSrv.exe Unison d:\path\to\SrvAny.exe" to define the service.
Open RegEdit and locate the "HKLM\SYSTEM\CurrentControlSet\Services\UNISON" path.
Create a SubKey called "Parameters", and then, in the Parameters key, create two REG_SZ values:
 Code:
Application	d:\path\to\unison.exe
AppParameters	-socket 1758 -logfile d:\path\to\unison.log
The 1758 is the port that I use - if you want to use something else, you'll need to update the MediaSync.prf root and force statements to match. Make sure the "d:\path\to" folder exists for the logs - I use a Unison\Logs folder.

Run NET START UNISON or start the Unison service from the service control panel. The server is ready!

Start simple - create a folder on the server root, put a couple of files in it and run the UNISON MEDIASYNC command on the client. (for a data sync, you can rename the bat and profile files to something meaningful.)

Verify that the folders are synced.. check the logs on the server.

With this setup, it took about 4 hours to complete an initial sync of my library to the external HDD over a Gig-E link (about 650G of music and audio books). Later sync's take just minutes.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D