CDBCOPY
Summary
This command copies CDBS catalogs and calibration reference file images
and tables from a remote system to a local disk. The command can be run
exclusively with command line parameters, or parameters can be read from
a disk file. The command can also be run as a pipeline process, CDBCPY.
Description
The remote directory (REMOTE_FILESPEC) on the remote machine (REMOTE_MACHINE)
is searched for one or more catalog files (ending in "*.cat").
Any that are found are retrieved to the local directory (LOCAL_FILESPEC)
using FTP controlled by parameters REMOTE_LOGIN and a user-supplied password.
Each catalog is read and files matching each rootname entry in the catalog
are searched for in REMOTE_FILESPEC. If there is sufficient disk space
on LOCAL_FILESPEC to hold all the files plus the DISK_SLOP_PERC, they are
copied back to LOCAL_FILESPEC. If any catalog entry does not match files
in REMOTE_FILESPEC, then the catalog copy is said to have failed, and will
be left on the remote machine. If DELETE_AFTER_COPY was selected, then
all successfully copied catalogs and calibration files will be deleted
from REMOTE_FILESPEC, after they have been confirmed to exist in LOCAL_FILESPEC.
A trailer file is created for each catalog copied from the remote machine.
This file will serve as a processing log for the rest of the CDB pipeline
processing.
When run in pipeline mode, the name of the catalog to search for on
the remote system is obtained from an OSF. Only this single catalog
and the files the catalog contains are retrieved from the remote system
in pipeline mode.
Usage
cdbcopy -pa pathfile -cat catalog_name -pw encrypted_passwd |
-fil parmfile |
-rm rmt_machine -rt rmt_machine_type -rf rmt_filespec
-lf local_filespec [-pw encrypted_passwd] [-pr process_name]
[-rl rmt_login] [-fi firewall_name] [-delete_after_copy]
[-rollback_failed_copy] [-dslop disk_slop_percent]
[-t temp_directory]
The flags can be specified in any order by any number of unique characters
(e.g. -de, -del, and -delete are treated equally).
Inputs
Command line or file parameters.
OPUS path file (if not run in command-line mode).
OPUS resource file (if not run in command-line mode).
Outputs
CDBS catalog and reference files
copied from remote machine to local disk. A trailer file (.trl) is created
for each catalog copied from the remote machine.
Constraints
Resource File
The following parameters appear in the CDBCPY resource file. Their values
can be specified directly in the resource file itself, or setting values
to names from the path file, can be pulled through from the path file.
FIREWALL
The name of the firewall if the task is invoked on a machine behind
a firewall. Different FTP syntax is used for these copies. Comment out
(with !) or delete this entire resource entry if you do not need firewall
syntax used.
REMOTE_MACHINE
The machine name for the remote UNIX host (e.g. ajuga)
REMOTE_FILESPEC
The directory where files will be looked for on the remote UNIX host
(e.g. /home/mswam/lookhere)
LOCAL_FILESPEC
The directory on the local machine where files will be copied to (e.g.
DUDBUF)
REMOTE_LOGIN (optional)
The login name for the remote UNIX machine, if different from the login
name that starts the CDBCOPY command.
REMOTE_TYPE
The operating system type of the remote system. Possible choices are
VMS or UNIX, but CDBS currently always serves files from a UNIX system.
DISK_SLOP_PERC
The extra percentage disk space that is added to the exact disk space
required when determining if enough space exists for catalog installation.
(e.g. Providing a value of "3" implies that "1.03*exact space required"
will be used to determine if sufficient disk space exists, i.e. 3% slop)
DELETE_AFTER_COPY
If set to YES or TRUE, this flag indicates that successfully copied
files should be deleted from the remote host.
ROLLBACK_PARTIAL_COPY
If set to YES or TRUE, this flag indicates that partial copies of catalogs
and their contents will not be performed. If one or more files from a catalog
cannot be copied back successfully, the catalog and all of its files will
remain on the remote host. This only affects failure of a copying operation.
Setting this value to NO or FALSE will NOT allow catalogs to be copied
back that have some files missing on the remote host. It only affects copying
operations that fail during copying (because of network outage, etc.).
TEMP_DIR
Directory name or logical where temporary files can be created. CDBCOPY
will normally clean up all temporary files it creates, unless there is
an unexpected problem.
FILE_TYPE
For CDBCOPY, this value is read but not used. It normally controls
the type of file transfer performed by the FTP. The CDBCOPY code already
knows to transfer catalogs using ASCII, and reference files using BINARY.
This parameter just appears for compatibility with the more generic NETCOPY
tool.
PUT_OR_GET
For CDBCOPY, this value should be set to GET. In the more generic NETCOPY
tool, this parameter indicates whether pulling (GET) or pushing (PUT) files
from/to the remote system, but CDBCOPY is always run in GET mode.
PASSWORD_PROMPT
Supplies the password prompt
for the PMG to use (reminds the user which password is being request of
them).
Command Line Arguments
-cat[alog_name]
Name of a particular catalog
to process. Used in pipeline mode with a catalog name from the OSF.
-pw[passwd]
Encrypted password used for
FTP login
-pr[ocess_name]
Used to locate the process
resource file in pipeline mode (default=CDBCPY)
-pa[thfile]
Name of the pipeline path file.
-fil[ename]
Name of a parameter filename (same contents as process resource file)
-rm[achine]
-rt[ype]
-rf[ilespec]
-lf[ilespec]
-rl[ogin]
-ds[lop_percentage]
-de[lete_after_copy]
Same as DELETE_AFTER_COPY
-ro[llback_partial_copy]
Same as ROLLBACK_PARTIAL_COPY
-fir[ewall]
-t[emp_directory]
Examples
$ cdbcopy -pa opus_definitions_dir:blue.path -cat opus_10345_u.cat
-pw w2e3r4t5r4e3w2
Uses values from the process resource file (opus_definitions_dir:cdbcpy.resource)
to determine which remote machine and directories should be searched for
the catalog "opus_10345_u.cat" and its files. The encrypted
password supplied is decrypted and used to access the FTP account defined
by resource entry REMOTE_LOGIN.
$ cdbcopy -rm ajuga -rt UNIX -rf /home/mswam/data -lf disk$lyra:[mswam.dest]
-ds 5 -de
Searches for catalogs on the UNIX machine "ajuga" in the directory "/home/mswam/data".
If found, they are copied back to "disk$lyra:[mswam.dest]" if enough disk
space plus 5% slop is available. If the files are copied successfully,
they are deleted afterwards from the remote host "ajuga".