CDBDEL
Summary
This command deletes obsolete reference files and tables from the reference
file directories, as indicated by deletion entries in a CDBS release catalog.
When run as a pipeline process, the
files will only be deleted if the catalog file itself is older than
a configurable time interval.
Description
In pipeline mode, the
age (i.e. modification time) of the release catalog is checked to see
if this delivery is "old enough" to allow deletions to proceed.
The resource parameter MIN_DELETION_AGE indicates the minimum number of
days a catalog must "age" before deletions can be applied. This gives
pipeline data using these reference files a chance to complete calibration
before the deletions occur.
If pipeline mode is not being used, the age test is not performed.
(The age test actually takes place in a controlling script, cdbdel.sh,
not in the cdbdel command itself, which is used in interactive mode).
If sufficient aging has occurred, this process
reads the entries from a CDBS release catalog and for each deletion entry,
tries to locate the reference file in the appropriate reference file
directory.
If reference files are found, they are deleted from disk. The
reference file directories are defined by environment variables
in opus_login(e.g. uref, nref, mtab, ttab, etc.).
The deletions indicated in a release catalog are for truly obsolete,
superceeded reference files, as determined by CDBS. They should never
be referenced again because other files with identical use_after criteria
have been delivered to replace them.
NOTE: The delay before file deletions are performed was
determined to be a reasonable approach to assuring that reference files
needed for calibration are not deleted from the pipeline while an exposure
is processsing between the Generic Conversion (reference file determination)
and Calibration (reference file use) stages. The approach is NOT 100%
reliable, but should be close to it.
Usage
cdbdel release_name path_name [-localfiles]
The flags (preceded by a dash '-') are optional and can be specified
in any order by any number of unique characters (e.g. -localfiles, -loc,
-l are treated equally). The positional parameters 'release_name' and 'path_name'
are required and MUST occur in the order listed.
Input
CDBS catalog file(s).
OPUS path file.
OPUS resource file.
Output
Reference files and tables deemed obsolete by DELETION entries
in a CDBS release catalog, are removed from the reference file directories.
Resource File
The following parameters appear in the CDBDEL 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.
CDB_DELETION_DIR
The directory searched for release catalogs matching the mask provided
for the release_name parameter. Use of the -localfiles qualifier supercedes
this value.
MIN_DELETION_AGE
The age in days a release catalog must "sit" before any file deletions
specified in it will be performed. This age test is only performed in
pipeline mode (under control of the cdbdel.sh script).
Required Command-Line Arguments
release_catalog_mask (required)
A newly released catalog file name. Wild card names are permitted.
Will be searched for in CDB_CATALOG_IN_DIR unless the -localfiles flag
is set on the command line, in which case the current directory is used.
path_file_name (required)
An OPUS path file providing resource values. The full path name is required
(OPUS_DEFINITIONS_DIR is not automatically prepended).
Optional Command-Line Arguments
-c[heck_only]
Optional flag specifying that only catalog verification is performed.
This consists of locating the files listed in the catalog on disk and verifying
that sufficient free disk space exists to perform the installation. No
disk changes are made in this mode.
-l[ocalfiles]
Optional flag specifying that CDBDB will look in the current working
directory for the release catalogs. If no catalogs are found, no processing
will be performed.
Examples
$ cdbdel opus_101_z.cat OPUS_DEFINITIONS_DIR:blue.path
Any DELETION entries in the release catalog opus_101_z.cat
are removed from the reference file directories.