TrickleChargeServerDoc.tioga
Rick Beach, June 15, 1985 5:58:45 pm PDT
Russ Atkinson (RRA) June 20, 1985 1:03:44 pm PDT
Eric Nickell February 25, 1986 11:21:55 am PST
Carl Hauser, February 28, 1987 2:18:41 pm PST
Bill Jackson (bj) April 14, 1988 9:08:36 pm PDT
Willie-sue, October 25, 1991 5:04 pm PDT
TrickleChargeServer

PCEDAR 2.0 — FOR INTERNAL XEROX USE ONLY
TrickleChargeServer
-- how to replicate Cedar directories
Willie-Sue Orr
© Copyright 1985, 1986, 1988, 1989, 1990, 1991 Xerox Corporation. All rights reserved.
Abstract: The TrickleChargeServer provides a command to replicate a directory (or a DF file) from one server onto another preserving version numbers.
Created by: Russ Atkinson
Maintained by: Willie Sue Orr <Willie-Sue:Parc:Xerox>
Keywords: PCedar, prefixMap entry, replicated directories
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
The TrickleChargeServer package will register commands that enables copying sets of files, preserving the version numbers and dates, which is of particular use when trying to replicate servers.
There are four commands (long and short verions of each:
TrickleChargeOneDF { prefixMapEntry fromTranslation toTranslation } subDirAndDfName
TrickleChargeOneDF -l { prefixMapEntry fromTranslation toTranslation } localOrFullDfName
TrickleChargeByIndividualDF { prefixMapEntry fromTranslation toTranslation } subDirAndDfName
TrickleChargeAllDFs { prefixMapEntry fromTranslation toTranslation } { subdirForDfs }
TrickleChargeDirectory { prefixMapEntry srcDir dstDir }
TCOne, TCInd, TCAll, and TCDir are the short versions.
Note: if TCAll is not given a subdirForDfs, it will enumerate the Top subdirectory. This is the standard organization for PCedar release directories (the standard PFS enumeration does not descend into subdirectories). The braces ({}) are not required; they can be used to make the commands more readable for people.
The -l (for localDF) option has been added to the TrickleChargeOneDF and TrickleChargeByIndividualDF command; this allows one to use a "local" df file to drive the TrickleCharge, to break the TrickleCharge up into smaller pieces. The "local" df file can be local or a full path name; it is given to PFS with only a !H appended (YOU MUST SUPPLY THE .DF suffix).
One can now have the TrickleChargeServer write its output to a file; it will flush the file after every significant output. This works better than using commander redirect, which does not write to the file very often. To start a new file, use -o fileName; to append to an existing file, use -a fileName.
There is no built-in repeat (one can use the Repeat command - see example below).
Switches Summary:
-a fileName: append output messages to fileName
-b:  bestEfforts (ignore unknown prefixes)
-d:  debug (inhibits file transfer)
-l:  localDF (assumes df name is local or full ({not prefixMapEntry relative})
-m:  move dfs even if errors
-o fileName: output messages to new fileName
-r:  retrieve rather than copy
-v:  verify (no transfers, messages only for missing files)
Examples
TCAll -o tcpcedar.log { /PCedar2.0 -vux:/net/eich/pixel1/pcedar2.0/ -vux:/net/gharlane/hopi/pcedar2.0/ }
Refreshes Gharlane from the truth on Eich, by enumerating all the df files on [PCedar2.0]<Top> and moving them to /net/gharlane/hopi/pcedar2.0/. Whenever the prefixMapEntry PCedar2.0 is encountered, it is translated to -vux:/net/eich/pixel1/pcedar2.0/ when reading and to -vux:/net/gharlane/hopi/pcedar2.0/ when writing. Files that are not named by PCedar2.0 will not be moved. Output will be written to tcpcedar.log.
TCOne { /PCedar2.0 -vux:/net/eich/pixel1/pcedar2.0/ -vux:/net/gharlane/hopi/pcedar2.0/ } /top/BasicCedar-Suite.df
Makes sure that the files controlled by -vux:/net/eich/pixel1/pcedar2.0/top/BasicCedar-Suite.df are current on -vux:/net/gharlane/hopi/pcedar2.0/.
TCDir { -ux:/net/gharlane/cherokee/xrhome/DEVELOPMENT/ -ux:/net/gharlane/cherokee/xrhome/DEVELOPMENT/ -ux:/net/palain/jaune/xrhome/DEVELOPMENT/ }
Makes sure that the files from -ux:/net/gharlane/cherokee/xrhome/DEVELOPMENT/ are current on -ux:/net/palain/jaune/xrhome/DEVELOPMENT/.
DON"T use -ux: syntax in -vux: directories for TCDir; it will copy ALL versions (all files) in the directory, not what you usually want.
TCDir { vux:/net/eich/pixel1/pcedar2.0/blackcherry/ -vux:/net/eich/pixel1/pcedar2.0/blackcherry/ -vux:/net/gharlane/hopi/pcedar2.0/blackcherry/ }
This is NOT recommended for release directories, since it is not starting from the df files and will miss files in top/ and commands/ .
Repeat " TCAll { /CedarCommon2.0 -vux:/net/eich/marron/cedarcommon2.0/ -vux:/net/gharlane/mohawk/cedarcommon2.0/ }; TCAll { /PCedar2.0 -vux:/net/eich/pixel1/pcedar2.0/ -vux:/net/gharlane/hopi/pcedar2.0/ } " 86400 9pm
this would repeat the two TCall commands once a day, starting at 9pm
Use of XNS protocols only.
It is now possible to use only XNS protocols for trickle charging. It is required that two machines cooperate by one machine being the server and the other the client of the XNS TrickleCharge protocol. On the server, SetUpXNSServer.cm must be run. The server implements a simple remote program that implements file info and retrieve capability using PFS. The client make use of this via a remote file suffix of -TC. Files to be referenced use the directory part of the name as the server name. The rest of the file name becomes the name to be accessed. (i.e. /Kaibab:Parc-TC/PCedar2.0/Top/*.df becomes /PCedar2.0/Top/*.df)
To use XNS protocols for trickle charging, the TrickleCharger must be told to use the retrieve (rather than the standard copy) option for getting files. There are long and short names for all the TrickleCharge commands, that say to use the retrieve option instead of the copy option.
RetTrickleChargeAllDFs, RTCAll
RetTrickleChargeOneDF, RTCOne
RetTrickleChargeByIndividualDF, RTCInd
RetTrickleChargeDirectory, RTCDir
The server that is being maintained for this special TC protocol is Kaibab:Parc:Xerox; this is a SPARCStation running PCedar. This special server is (almost) guaranteed to be running from 6pm (Pacific Coast time) until 9am the next morning.
Here are some examples of how to use the TC protocols for trickle charging.
pma /TCPCedar Kaibab:Parc:Xerox-TC:/PCedar2.0
RTCOne { /PCedar2.0 /TCPCedar/ -vux:/net/gharlane/hopi/pcedar2.0/ } /Top/BulletProofVest-Suite.df
It is necessary to have a prefix map entry for (at least) Kaibab:Parc-TC; that is, you must at least do:
pma /KH Kaibab:Parc-TC:/
RTCOne { /PCedar2.0 /kh/PCedar2.0/ -vux:/net/gharlane/hopi/pcedar2.0/ } /Top/BulletProofVest-Suite.df
RTCAll { /PCedar2.0 /kh/pcedar2.0/ -vux:/net/gharlane/hopi/pcedar2.0/ }
As a final comment, it is not clear that RTCAll will work; the enumeration of the top directory will probably take too long. So it is suggested that one use /PCedar2.0/Top/PCedar.df (a top level df that INCLUDEs all of the dfs that are officially part of PCedar) and do something like:
RTCOne { /PCedar2.0 /kb/PCedar2.0/ -vux:/net/gharlane/hopi/pcedar2.0/ } /Top/PCedar.df
Then you must do (as a separate command, because PVersionMap.df is not in PCedar.df):
RTCOne { /PCedar2.0 /kb/PCedar2.0/ -vux:/net/gharlane/hopi/pcedar2.0/ } /Top/PVersionMap.df
NOTE: this step is no longer necessary; the version maps are officially part of the release now.
WARNING: One cannot use the stardard copy command to get files via Kaibab:Parc-TC. The new command TCCopy is provided, with the same syntax as copy.