archive - Performs archive tape related operations

SYNOPSIS

archive  [ parameter=value ... ]
Parameters are: operation, dev_name, new_tape, tape_label, pass_number, position, catalog_pass, input_dev, output_dev, num_passes, rewind_tape, time_order, old_goes, printout, write_block_size, write_dataset, restore_dataset, telemetry, satellite, start_date, start_time, duration

DESCRIPTION

archive is used for writing and reading passes (raw data) from an archive tape. In addition, archive enables the user to list and copy passes, position and initialize tapes and determine the current location on a tape.

archive can also be used to write processed datasets to tape and to restore processed datasets from tape. When archiving processed datasets, the user can indicate that satellite/date/time information can be taken from a given online raw pass; otherwise, an attempt is made to read this information from the dataset itself. In either case, the user can override this information using satellite/date/time parameters.

PARAMETERS

operation
Specifies the type of operation to be performed.

Valid options are:  write, restore, where, header, what, rewind, end, copy, posit, list, init, unload, mwrite, mrestore, truncate, trimpass, dtwrite and dtrestore.  There is no default.

write

Archive a pass from online storage (passdisk) to tape or disk.
restore
Put the pass at which the tape is positioned, back to the pass disk.
where
Position the tape to the closest header on the tape and report back the header information.
header
Currently the same as where, except that header information is written to stdout without any titles.
what
Currently the same as where.
rewind
Rewind the tape.
end
Go to the end of the tape. (archive automatically does this before it writes the next pass.)
copy
Copy a user-specified number of passes from one tape to another.
posit
Position the tape to a user-specified pass number using actual header information.
list
Lists contents of the tape starting at the current position.
init
Prepare a tape for use by writing a special header.  A tape must be initialized before it can be used.  As a part of the initialization process, the user will be prompted to enter an alphanumeric character string to identify the tape.  This ID will be included in the header information as tape_label.  The user should also label the tape cartridge with this ID.
unload
Rewind and eject a tape.
mwrite
Write multiple passes to tape; optionally label the tape first.
mrestore
Restore multiple passes from tape.
truncate
Make the current position the end of the tape.
trimpass
Remove unused bytes at the end of an online pass file. This is only necessary if the user has non-TeraScan applications that need to read online pass files directly. Such applications must be mindfull of any non-zero leading offset defined in the configuration file $PASSDIR/BAST.
dtwrite
Write a processed dataset to tape.
dtrestore
Restore a processed dataset from tape.
dev_name
Specifies the name of the archive device for all operations except copy.

Valid responses are any entry in the file $PASSDIR/devtable. If the operation is write, dev_name can be a standard UNIX file name. The default is defined by the environment variable $TAPE.

input_dev
Specifies the name of the input device for a copy operation.

Valid responses are any entry in the file $PASSDIR/devtable. The default is defined by the environment variable $TAPE.

output_dev
Specifies the name of the output device for a copy operation.

Valid responses are any entry in the file $PASSDIR/devtable, or a standard UNIX file name. The default is defined by the environment variable $TAPE.

num_passes
Specifies the number of passes to copy.

Valid responses are integers ranging from 1 to the total number of passes on the input tape.  The default is 1.

position
For the posit operation, this parameter specifies the number of the pass on tape to go to.

Valid responses are integers ranging from 1 to the total number of passes on the tape being positioned.  The default is 1.

pass_number
Specifies the number of the pass on the pass disk. For the mwrite and mrestore operations, more than one number can be entered.

Valid responses are integers ranging from 1 to the total number of "partitions" on the pass disk.  The default varies. For a write operation the default this parameter specifies is the most recent pass on the pass disk.

time_order
For the mwrite operation, this determines whether or not the specified online passes should be written to tape in date/time order.

Valid responses are yes and no. The default is yes.

catalog_pass
Some archive operations give the user the option of adding data entries to the online pass catalog.  For example, if you list passes on an archive tape, you will have the option of adding the listed passes to the catalog.

Valid responses are yes and no. The default is yes.

printout
Some archive operations produce a printed report at the user's request.

Valid responses are yes and no. The default is yes.

new_tape
For the mwrite operation, this specifies that the tape is a new tape.

Valid responses are yes and no. The default is yes.  If the response is yes, archive prompts for a tape label.

tape_label
Specifies the name used to identify an archive tape. The name is a user-specified, alphanumeric character string assigned during tape initialization with archive init and is written on the label attached to the tape cartridge.  The name cannot exceed 12 characters in length and is case sensitive.

There is no default for this parameter.

rewind_tape
OPTIONAL. Some archive operations may or may not rewind the tape after their completion.

Valid responses are yes and no.  The default is no.

old_goes
OPTIONAL. The entry for this parameter must be yes in order for archive to work with GOES-7 data captured with TeraScan version 2.4 or earlier.

Valid responses are yes and no.  The default is no.

write_block_size
OPTIONAL. This parameter is used only when operation=write. The user can indicate an alternate blocksize for outputting raw pass records. Raw pass data written with an alternate blocksize cannot be restored using operation=restore. This parameter is only useful for writing raw pass data from TeraScan so it can be read by other systems; e.g., write_block_size=22180 for HRPT. The default value is 0, which means do not use an alternate blocksize for writing.
restore_dataset
This parameter is used only when operation=dtrestore. It indicates the name of the output disk file. There is no default.
ansi_file_hdr
OPTIONAL.  This parameter prepends the output filename with the ANSI header for output of global imaging raw pass data from a TeraScan online pass.

Valid responses are yes and no.  The default is no.

The following parameters only are used when operation=dtwrite. Defaults for all these parameters (except write_dataset and telemetry) are taken from the online pass catalog, if the user has specified a non-zero input pass number, or are computed from the input dataset, if it is TDF.

write_dataset

The name of the dataset file to be archived. There is no default.
telemetry
User-defined telemetry name, at most 10 characters long. archive automatically prefixes this name with a '-' in the output tape file header. The default is dataset.
satellite
Satellite name, e.g., noaa-14, goes-8.
start_date
Start date for dataset, e.g., yy/mm/dd or yyyy/mm/dd.
start_time
Start time for dataset, e.g., hh/mm/ss.
duration
Duration time for dataset, e.g., mm:ss.

EXAMPLES

There are examples for the following operations: init, write, mwrite, posit, where, header, restore, rewind, list, copy, end, truncate, dtwrite, dtrestore, and unload.

Example 1:   Initialize a tape. A tape must be initialized as an archive tape before it can be used for any other archive operations.

% archive
operation      : char( 7) ? init
dev_name       : char(75) ? [/dev/rmt/0n
tape_label     : char(11) ? DEMO01


Example 2:   Write an online pass (raw pass data) to an archive tape.

% archive
operation      : char(  9) ? write
dev_name       : char(255) ? [/dev/rmt/0n]
pass_number    : int       ? [109] 50
catalog_pass   : char(  3) ? [yes]
/dev/rmt/0n: Writing pass 3 from disk pass 50

pass  satel    telem    date      time      orbit    scans    label
1     meteo-6  pdus     1997/08/29  19:01:52  0        629      DEMO01

/dev/rmt/0n: 629 lines written
 

Example 3:   Write several passes to tape at once.

% archive
operation      : char(  9) ? mwrite
dev_name       : char(255) ? [/dev/rmt/0n]
new_tape       : char(  3) ? [yes] no
pass_number    : int (109) ? [109] 51^53
catalog_pass   : char(  3) ? [yes] y
time_order     : char(  3) ? [yes]
/dev/rmt/0n: Writing pass 1 from disk pass 51

pass  satel    telem    date      time      orbit    scans    label
2     meteo-6  pdus     1997/08/29  20:01:52  0        629      DEMO01
 

/dev/rmt/0n: 629 lines written
/dev/rmt/0n: Writing pass 2 from disk pass 52

pass  satel    telem    date      time      orbit    scans    label
3     meteo-6  pdus     1997/08/29  21:01:52  0        629      DEMO01

/dev/rmt/0n: 629 lines written
/dev/rmt/0n: Writing pass 3 from disk pass 53

pass  satel    telem    date      time      orbit    scans    label
4     meteo-6  pdus     1997/08/29  22:01:51  0        629      DEMO01
 

/dev/rmt/0n: 629 lines written
 

Example 4:   Position the tape to a user-specified location.

% archive
operation      : char(  9) ? posit
dev_name       : char(255) ? [/dev/rmt/0n]
position       : int       ? [1] 2

pass  satel    telem    date      time      orbit    scans    label
2     meteo-6  pdus     1997/08/29  20:01:52  0        629      DEMO01
 

Example 5:   Find out where the tape is positioned. The what and where operations are identical.

% archive
operation      : char(  9) ? where
dev_name       : char(255) ? [/dev/rmt/0n]

pass  satel    telem    date      time      orbit    scans    label
2     meteo-6  pdus     1997/08/29  20:01:52  0        629      DEMO01
 

Example 6:   Find out where the tape is positioned; assign header information to a C-shell variable; use header info as input to passinfo

% set HDR = `archive operation=header dev_name=$TAPE`
% echo $HDR
2     meteo-6  pdus     1997/08/29  20:01:52  0        629      DEMO01
% set SAT = `passinfo item=satellite archive_header="$HDR"`
% echo $SAT
meteo-6
 

Example 7:   Restore data from the current position on an archive tape to the pass disk.

% archive
operation      : char(  9) ? restore
dev_name       : char(255) ? [/dev/rmt/0n]
pass_number    : int       ? 33

pass  satel    telem    date      time      orbit    scans    label
2     meteo-6  pdus     1997/08/29  20:01:52  0        629      DEMO01
 

Example 8:   Rewind an archive tape.

% archive
operation      : char( 7) ? rew
dev_name       : char(75) ? [/dev/rmt/0n]
 

Example 9:   List the contents of an archive tape.

% archive
operation      : char(  9) ? list
dev_name       : char(255) ? [/dev/rmt/0n]
printout       : char(  3) ? [no]
catalog_pass   : char(  3) ? [no]
pass  satel    telem    date      time      orbit    scans    label
1     meteo-6  pdus     1997/08/29  19:01:52  0        629      DEMO01
2     meteo-6  pdus     1997/08/29  20:01:52  0        629      DEMO01
3     meteo-6  pdus     1997/08/29  21:01:52  0        629      DEMO01
4     meteo-6  pdus     1997/08/29  22:01:51  0        629      DEMO01
5     LASTPASS LASTPASS LASTPASS  LASTPASS  LASTPASS LASTPASS DEMO01
 

Example 10:   Copy the pass data from one tape to another. This operation requires two separate tape
devices.  This example copies the first four passes from the input tape to the current position on the output tape.

% archive
operation      : char( 7) ? rew
dev_name       : char(75) ? [/dev/rmt/0]
% archive
operation      : char( 7) ? copy
input_dev      : char(75) ? [/dev/rmt/0n]
output_dev     : char(75) ? [/dev/rmt/0n] /dev/rmt/1n
num_pass       : int      ? [1] 4
catalog_pass   : char( 3) ? [yes] n
The headers of the passes being copied will be displayed.
 

Example 11:   Move to the end of the tape.

% archive
operation      : char( 7) ? end
dev_name       : char(75) ? [/dev/rmt/0n]
 

Example 12:   Make current position the end of the tape.  In this example, all passes starting with pass 2 are deleted from the archive tape.

% archive
operation      : char(  9) ? posit
dev_name       : char(255) ? [/dev/rmt/0n]
position       : int       ? [1] 2

pass  satel    telem    date      time      orbit    scans    label
2     meteo-6  pdus     1997/08/29  20:01:52  0        629      DEMO01

% archive
operation      : char(  9) ? truncate
dev_name       : char(255) ? [/dev/rmt/0n]

This will wipe out all data beyond the current tape position.
Are you sure you wish to proceed ? y
 

Example 13:   Write a processed dataset to tape.

% archive
operation      : char(  9) ? dtwrite
write_dataset  : char(255) ? m6.97241.1900
telemetry      : char( 10) ? [dataset]
pass_number    : int       ? [0]
satellite      : char( 11) ? [meteo-6]
start_date     : char( 15) ? [1997/08/29]
start_time     : char( 15) ? [19:00:28]
duration       : char( 15) ? [00:24:02]
dev_name       : char(255) ? [/dev/rmt/0n]
catalog_pass   : char(  3) ? [yes]
/dev/rmt/0n: Writing pass 2 from m6.97241.1900

pass  satel    telem    date      time      orbit    scans    label
2     meteo-6  -dataset 1997/08/29  19:00:28  0        306      DEMO01

/dev/rmt/0n: 306 lines written
 

Example 14:   Restore a processed dataset from tape.

% archive
operation      : char(  9) ? posit
dev_name       : char(255) ? [/dev/rmt/0n]
position       : int       ? [1] 2

pass  satel    telem    date      time      orbit    scans    label
2     meteo-6  -dataset 1997/08/29  19:00:28  0        306      DEMO01

% archive
operation      : char(  9) ? dtrestore
restore_dataset: char(255) ? m6.97241.1900
dev_name       : char(255) ? [/dev/rmt/0n]

pass  satel    telem    date      time      orbit    scans    label
2     meteo-6  -dataset 1997/08/29  19:00:28  0        306      DEMO01
 

Example 15:   Rewind an archive tape and eject it from the drive.

% archive
operation      : char( 7) ? unload
dev_name       : char(75) ? [/dev/rmt/0n]
 

FILES

devtable

Last Update: $Date: 2002/11/27 19:36:32 $