For the Archivist, the unix rexx script: ducs_arch
The archivist works from the DUCS account on any of the SLAC central
unix VESTA machines. By logging on in this manner, one gets the privileges
for the necessary database work and remote
shell logins.
All console activity in this account is logged to disk (the .login file
initiates this with a call to the unix script command). To quit work in
this account, first type "exit" to end the script session, then
log out as usual. The script output is left in the top level DUCS directory
with a filename formed from the date and time of the session's start. For
example, a session from 12 February was logged to disk as the file: 11:28:18_12_Feb_97.
All archive actions are performed via the command ducs_arch located
in the unix DUCS account's home directory. This rexx script performs remote
shell logins to the DUCS accounts on the various vms hosts. The actual
vms work of measuring, copying, restoring and deleting files is then performed
by the command file produtil:ducs_arch.com.
To assist in debugging, ducs_arch.com runs with verify set on.
The results can be found in the ducs_arch unix account's home directory
under names such as SLACAX_AXP.LOG.
If no problems are encountered, the LOG file is reused by the next
remote shell process.
Command Syntax
Click on the relevant syntax diagram to see implementation details.
- ducs_arch full
Copies the complete current DUCS code, forming a new major version
in the archive area.
The code is then also copied from the archive area to a tape.
This command should be used at a time when all DUCS nodes are believed
to be up to date.
It will perform automatic checks to confirm that this is indeed the case.
The archivist is prompted to enter a comment for the version.
- ducs_arch full axp_source='<host::dir_spec>'
vax_source='<host::dir_spec>'
Copies the complete set of DUCS code found at the specified directories,
forming a new major version in the archive area.
The code is then also copied from the archive area to a tape.
This form of the command will be used only in rare circumstances.
Vms directory specifications must be bracketed by single quotes to avoid
unix complaining about $ and ].
The archivist is prompted to enter a comment for the version.
- example:
ducs_arch full axp_source='slda6::$usr0:[fred.axp_code]' vax_source='slda6::$usr0:[fred.vax_code]'
- ducs_arch partial version=<major_vers>
axp_source='<host::dir_spec>' vax_source='<host::dir_spec>'
Copies the partial set of DUCS code found at the specified directories,
forming a new minor version in the archive area.
The code is then also copied from the archive area to a tape.
Vms directory specifications must be bracketed by single quotes to avoid
unix complaining about $ and ].
The archivist is prompted to enter a comment for the version.
- example:
ducs_arch partial version=14 axp_source='slda6::$usr0:[fred.axp_code]'
vax_source='slda6::$usr0:[fred.vax_code]'
- ducs_arch delete version=<major_vers.minor_vers>
Deletes the relevant version from disk, leaving it only on the
SLAC archive tapes.
The version comment is read back and confirmation is requested before the
delete actually occurs.
- example:
ducs_arch delete version=14.1
- ducs_arch restore version=<major_vers.minor_vers>
Copies the relevant version back to disk from the SLAC archive
tapes.
The version comment is read back and confirmation is requested before the
restore actually occurs.
- example:
ducs_arch restore version=14.1
Any of the above forms can also include the following parameters:
- test
Stops just short of actually changing the contents of the disk
or database.
All remote shell logins are exercised, but they have no actual effect.
- example:
ducs_arch full test
- skip=<host1.model1,host2.model2,...>
Skips sending commands to the specified host or hosts.
- example:
ducs_arch full skip=slda6.vax,vupacb.axp
Parameters may be specified in any order.
The archivist is prompted for any required parameters that are missing
from the command line.
Implementation Details
Joseph
Perl
24 September 1997