CDB_DELETE


This command deletes obsolete calibration reference files and tables from the pipeline directories, as indicated by entries in a CDBS release catalog. It generates and saves a log file of the steps performed.

Usage: cdb_delete release_name path_name

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.

It can't hurt anything to run this command against release catalogs that have already been "delete-processed" in the past. Messages will be written to the screen indicating that nothing was found to delete and the program will exit gracefully.

It is recommended that this tool be run against catalogs in CDB_DELETION_DIR when disk space needs to be reclaimed on the reference file disks. You can pass this command a wildcarded catalog file mask and run it against all catalogs in CDB_DELETION_DIR. Once complete, the catalogs there can be deleted.

NOTE: Before running CDB_DELETE, make sure that the pipeline Generic Conversion and Calibration stages are quiet. If you do not, there is the possibility that observations in these pipeline stages will fail to process if they are trying to use a reference file that is now obsolete. Such failures would only occur for observations that picked up their list of "valid" reference files before the obsolete records were deleted from the database.

Context

Inputs

Outputs

Resource file

The following parameters appear in the CDB_DELETE 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

Parameters

release_catalog_mask (required)

path_file_name (required)

Qualifiers

-l[ocalfiles]

Examples

$ cdb_delete opus*.cat OPUS_DEFINITIONS_DIR:blue.path

Opens every release catalog found in CDB_DELETION_DIR and performs file deletions of the obsolete reference files and tables indicated by deletion entries in the catalog. If the files indicated cannot be found on disk, then no action is taken.

$ cdb_delete opus*.cat OPUS_DEFINITIONS_DIR:blue.path -local

Opens every release catalog in the current directory and performs file deletions of the obsolete reference files and tables indicated.